From: Kalervo Kujala Date: Tue, 6 Sep 2011 21:34:58 +0000 (+0300) Subject: Use radix in parseInt function calls. X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=5c132be0e02545b066bb45e40afc3ee4416767b8;p=pdf.js.git Use radix in parseInt function calls. --- diff --git a/pdf.js b/pdf.js index de1b412..b6a310f 100644 --- a/pdf.js +++ b/pdf.js @@ -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; }