[Pkg-javascript-commits] [pdf.js] 180/414: Correct the upper bound used when building the `transferMap` for SMasks (PR 6723 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 4770b516fe82028d6dc5e7cb84c84635ac9066bb
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Wed Feb 3 13:31:48 2016 +0100
Correct the upper bound used when building the `transferMap` for SMasks (PR 6723 followup)
Even though the currently known test-cases render correctly without this patch, that seems more like a lucky coincidence, given that there's no guarantee that `transferMap[255] === 0` for every possible transfer function.
---
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 17816c6..224b23b 100644
--- a/src/core/evaluator.js
+++ b/src/core/evaluator.js
@@ -362,7 +362,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
var transferFn = PDFFunction.parse(this.xref, transferObj);
var transferMap = new Uint8Array(256);
var tmp = new Float32Array(1);
- for (var i = 0; i < 255; i++) {
+ for (var i = 0; i < 256; i++) {
tmp[0] = i / 255;
transferFn(tmp, 0, tmp, 0);
transferMap[i] = (tmp[0] * 255) | 0;
--
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