]> git.parisson.com Git - pdf.js.git/commitdiff
Relax EI search for inline images
authornotmasteryet <async.processingjs@yahoo.com>
Sun, 19 Feb 2012 02:20:25 +0000 (20:20 -0600)
committernotmasteryet <async.processingjs@yahoo.com>
Sun, 19 Feb 2012 02:20:25 +0000 (20:20 -0600)
src/parser.js

index fc448ff661fa915f265bb4b62850fa5f358717ca..fc8f5bc66bb530bf4c5ced268a0eab802bca8029 100644 (file)
@@ -120,17 +120,17 @@ var Parser = (function ParserClosure() {
       // parse image stream
       var startPos = stream.pos;
 
-      // searching for the /\sEI\s/
+      // searching for the /EI\s/
       var state = 0, ch;
       while (state != 4 && (ch = stream.getByte()) != null) {
         switch (ch) {
           case 0x20:
           case 0x0D:
           case 0x0A:
-            state = state === 3 ? 4 : 1;
+            state = state === 3 ? 4 : 0;
             break;
           case 0x45:
-            state = state === 1 ? 2 : 0;
+            state = 2;
             break;
           case 0x49:
             state = state === 2 ? 3 : 0;