Use radix in parseInt function calls.

This commit is contained in:
Kalervo Kujala 2011-09-07 00:34:58 +03:00
parent 1db8ccaa21
commit 5c132be0e0

4
pdf.js
View File

@ -3162,7 +3162,7 @@ var XRef = (function() {
if (!IsCmd(obj3, 'obj')) {
// some bad pdfs use "obj1234" and really mean 1234
if (obj3.cmd.indexOf('obj') == 0) {
num = parseInt(obj3.cmd.substring(3));
num = parseInt(obj3.cmd.substring(3), 10);
if (!isNaN(num))
return num;
}
@ -3669,7 +3669,7 @@ var PDFDoc = (function() {
str += ch;
ch = stream.getChar();
}
startXRef = parseInt(str);
startXRef = parseInt(str, 10);
if (isNaN(startXRef))
startXRef = 0;
}