]> git.parisson.com Git - pdf.js.git/commitdiff
Use radix in parseInt function calls.
authorKalervo Kujala <kkujala@>
Tue, 6 Sep 2011 22:39:48 +0000 (01:39 +0300)
committerKalervo Kujala <kkujala@>
Tue, 6 Sep 2011 22:39:48 +0000 (01:39 +0300)
fonts.js

index 50eafc5669c95fa73296a277acaed6168dc78c57..89ccd0e9031284f738825f3c6a4020f7bc53d42e 100755 (executable)
--- a/fonts.js
+++ b/fonts.js
@@ -1623,7 +1623,7 @@ var Type1Parser = function() {
         i += length;
         token = '';
       } else if (isSeparator(c)) {
-        length = parseInt(token);
+        length = parseInt(token, 10);
         token = '';
       } else {
         token += c;
@@ -1634,16 +1634,16 @@ var Type1Parser = function() {
               break;
             case '/Subrs':
               ++i;
-              var num = parseInt(getToken());
+              var num = parseInt(getToken(), 10);
               getToken(); // read in 'array'
               for (var j = 0; j < num; ++j) {
                 var t = getToken(); // read in 'dup'
                 if (t == 'ND' || t == '|-' || t == 'noaccess') 
                   break;
-                var index = parseInt(getToken());
+                var index = parseInt(getToken(), 10);
                 if (index > j)
                   j = index;
-                var length = parseInt(getToken());
+                var length = parseInt(getToken(), 10);
                 getToken(); // read in 'RD'
                 var data = eexec.slice(i + 1, i + 1 + length);
                 var lenIV = program.properties.private['lenIV'];
@@ -1729,13 +1729,13 @@ var Type1Parser = function() {
             properties.textMatrix = matrix;
             break;
           case '/Encoding':
-            var size = parseInt(getToken());
+            var size = parseInt(getToken(), 10);
             getToken(); // read in 'array'
 
             for (var j = 0; j < size; j++) {
               var token = getToken();
               if (token == 'dup') {
-                var index = parseInt(getToken());
+                var index = parseInt(getToken(), 10);
                 var glyph = getToken();
               
                 if ('undefined' == typeof(properties.differences[index])) {