X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2Fxpdf%2FLexer.cc;h=9f0c3ca8f361d46e151c00e3e0857d3f0a1dac5b;hb=32d67a1939759e1c2c36441fc925fffa99e457a7;hp=1fa166f1951e543ba3b167f41b566e38ba645114;hpb=c7432833fe3a6469d63fad135151a92e12877b94;p=swftools.git diff --git a/pdf2swf/xpdf/Lexer.cc b/pdf2swf/xpdf/Lexer.cc index 1fa166f..9f0c3ca 100644 --- a/pdf2swf/xpdf/Lexer.cc +++ b/pdf2swf/xpdf/Lexer.cc @@ -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; +}