[Pkg-javascript-commits] [pdf.js] 28/161: Nest JBIG2 prediction if statements together

David Prévot taffit at moszumanska.debian.org
Sat Apr 19 14:16:20 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 2a9fe573c04d02dac89bde9ff75ef198624fbbb2
Author: p01 <p01 at opera.com>
Date:   Fri Mar 7 11:51:04 2014 +0100

    Nest JBIG2 prediction if statements together
    
    ltp can only become truthy if predition is true.
---
 src/core/jbig2.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/core/jbig2.js b/src/core/jbig2.js
index aad7d29..1110008 100755
--- a/src/core/jbig2.js
+++ b/src/core/jbig2.js
@@ -269,10 +269,10 @@ var Jbig2Image = (function Jbig2ImageClosure() {
       if (prediction) {
         var sltp = decoder.readBit(contexts, pseudoPixelContext);
         ltp ^= sltp;
-      }
-      if (ltp) {
-        bitmap.push(bitmap[bitmap.length - 1]); // duplicate previous row
-        continue;
+        if (ltp) {
+          bitmap[i] = row;//bitmap[i - 1]); // duplicate previous row
+          continue;
+        }
       }
       var row = new Uint8Array(width);
       bitmap.push(row);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list