[Pkg-javascript-commits] [pdf.js] 85/157: Fetch all indirect objects (i.e. `Ref`s) in `NameTree_getAll` and `NameTree_get` (issue 6204)
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 06:46:41 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 28f40b1b581f5e38638ba42be1c3fca92114a5a7
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Tue Jul 14 10:56:56 2015 +0200
Fetch all indirect objects (i.e. `Ref`s) in `NameTree_getAll` and `NameTree_get` (issue 6204)
---
src/core/obj.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/core/obj.js b/src/core/obj.js
index 25a85cb..f38effe 100644
--- a/src/core/obj.js
+++ b/src/core/obj.js
@@ -1408,7 +1408,7 @@ var NameTree = (function NameTreeClosure() {
var names = obj.get('Names');
if (names) {
for (i = 0, n = names.length; i < n; i += 2) {
- dict[names[i]] = xref.fetchIfRef(names[i + 1]);
+ dict[xref.fetchIfRef(names[i])] = xref.fetchIfRef(names[i + 1]);
}
}
}
@@ -1447,9 +1447,9 @@ var NameTree = (function NameTreeClosure() {
var kid = xref.fetchIfRef(kids[m]);
var limits = kid.get('Limits');
- if (destinationId < limits[0]) {
+ if (destinationId < xref.fetchIfRef(limits[0])) {
r = m - 1;
- } else if (destinationId > limits[1]) {
+ } else if (destinationId > xref.fetchIfRef(limits[1])) {
l = m + 1;
} else {
kidsOrNames = xref.fetchIfRef(kids[m]);
@@ -1473,9 +1473,9 @@ var NameTree = (function NameTreeClosure() {
// Check only even indices (0, 2, 4, ...) because the
// odd indices contain the actual D array.
m = (l + r) & ~1;
- if (destinationId < names[m]) {
+ if (destinationId < xref.fetchIfRef(names[m])) {
r = m - 2;
- } else if (destinationId > names[m]) {
+ } else if (destinationId > xref.fetchIfRef(names[m])) {
l = m + 2;
} else {
return xref.fetchIfRef(names[m + 1]);
--
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