[Pkg-javascript-commits] [pdf.js] 182/414: Actually ignore no-op `setGState` (PR 5192 followup)

David Prévot taffit at moszumanska.debian.org
Tue Jun 28 17:12:19 UTC 2016


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

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

commit 2d4a1aa0afc8265d360b72830fc9d8af5e0ba978
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Wed Feb 3 14:29:20 2016 +0100

    Actually ignore no-op `setGState` (PR 5192 followup)
    
    The intention of PR 5192 was to avoid adding empty `setGState` ops to the operatorList. But the patch accidentally used `>=`, which means that it's not actually working as intended, since empty arrays always have `length === 0`.
---
 src/core/evaluator.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/evaluator.js b/src/core/evaluator.js
index 224b23b..bf9b055 100644
--- a/src/core/evaluator.js
+++ b/src/core/evaluator.js
@@ -542,7 +542,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
         }
       }
       return promise.then(function () {
-        if (gStateObj.length >= 0) {
+        if (gStateObj.length > 0) {
           operatorList.addOp(OPS.setGState, [gStateObj]);
         }
       });

-- 
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