upgraded to xpdf-3.01pl1
[swftools.git] / pdf2swf / xpdf / Lexer.cc
index 1fa166f..9f0c3ca 100644 (file)
@@ -171,6 +171,13 @@ Object *Lexer::getObj(Object *obj) {
     scale = 0.1;
     while (1) {
       c = lookChar();
+      if (c == '-') {
+       // ignore minus signs in the middle of numbers to match
+       // Adobe's behavior
+       error(getPos(), "Badly formatted number");
+       getChar();
+       continue;
+      }
       if (!isdigit(c)) {
        break;
       }
@@ -472,3 +479,7 @@ void Lexer::skipToNextLine() {
     }
   }
 }
+
+GBool Lexer::isSpace(int c) {
+  return c >= 0 && c <= 0xff && specialChars[c] == 1;
+}