From 2d4a1aa0afc8265d360b72830fc9d8af5e0ba978 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 3 Feb 2016 14:29:20 +0100 Subject: [PATCH] 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 224b23b99..bf9b05563 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]); } });