]> git.parisson.com Git - pdf.js.git/commitdiff
Handle blackTable2 array access correctly.
authorKalervo Kujala <kkujala@com>
Mon, 17 Oct 2011 19:24:19 +0000 (22:24 +0300)
committerKalervo Kujala <kkujala@com>
Mon, 17 Oct 2011 19:24:19 +0000 (22:24 +0300)
pdf.js

diff --git a/pdf.js b/pdf.js
index 60774808a0f62751a3a5252d9a658fe3558943e7..f11d28c369e59bd18b8984a3e4f4b79221dd523b 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -2098,7 +2098,7 @@ var CCITTFaxStream = (function ccittFaxStream() {
           if (i < end)
             code <<= end - i;
           if (code >= limit) {
-            var p = table[code];
+            var p = table[code - ((limit == -1) ? 0 : limit)];
             if (p[0] == i) {
               this.eatBits(i);
               return [true, p[1]];