diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/svg/SvgPathReader.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/svg/SvgPathReader.java index 8c09d68fd..5e12bad8a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/svg/SvgPathReader.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/svg/SvgPathReader.java @@ -78,27 +78,33 @@ public class SvgPathReader { int startPos = pos; readWhiteSpaces(); - char ch = str.charAt(pos); + + char ch; + ch = str.charAt(pos); if (ch == '-') { pos++; } digitSequence(); - ch = str.charAt(pos); - if (ch == '.') { - pos++; - digitSequence(); + if (hasNext()) { + ch = str.charAt(pos); + if (ch == '.') { + pos++; + digitSequence(); + } } - ch = str.charAt(pos); - if (ch == 'e') { - pos++; + if (hasNext()) { ch = str.charAt(pos); - if (ch == '-') { + if (ch == 'e') { pos++; - } + ch = str.charAt(pos); + if (ch == '-') { + pos++; + } - digitSequence(); + digitSequence(); + } } boolean ok = false;