diff options
Diffstat (limited to 'Build/source/libs/xpdf/xpdf-src/xpdf/Zoox.cc')
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/xpdf/Zoox.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/Zoox.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/Zoox.cc index 9e4fb47900c..2e41d990b59 100644 --- a/Build/source/libs/xpdf/xpdf-src/xpdf/Zoox.cc +++ b/Build/source/libs/xpdf/xpdf-src/xpdf/Zoox.cc @@ -6,10 +6,6 @@ #include <aconf.h> -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -279,6 +275,8 @@ bool ZxDoc::parse(const char *data, Guint dataLen) { parseEnd = data + dataLen; parseSpace(); + parseBOM(); + parseSpace(); parseXMLDecl(this); parseMisc(this); parseDocTypeDecl(this); @@ -783,6 +781,12 @@ GString *ZxDoc::parseQuotedString() { return s; } +void ZxDoc::parseBOM() { + if (match("\xef\xbb\xbf")) { + parsePtr += 3; + } +} + void ZxDoc::parseSpace() { while (parsePtr < parseEnd && (*parsePtr == '\x20' || *parsePtr == '\x09' || |