diff options
author | Soeren Balko <Soeren.Balko@gmail.com> | 2013-09-14 20:43:31 +1000 |
---|---|---|
committer | Soeren Balko <Soeren.Balko@gmail.com> | 2013-09-14 20:43:31 +1000 |
commit | 80e69073322a40fe3b11c85d71b8bfa819aad5b4 (patch) | |
tree | 53e1dffe1e44e7ec7a3a29fca63d2707edc329c7 /src/library.js | |
parent | 0fa9b04adc5be854213aec2f855b73186df2507d (diff) |
Incorporating formatting suggestions from pull request
Diffstat (limited to 'src/library.js')
-rw-r--r-- | src/library.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library.js b/src/library.js index 84fd08b6..9c502cef 100644 --- a/src/library.js +++ b/src/library.js @@ -1713,8 +1713,8 @@ LibraryManager.library = { if (format[formatIndex] === '%' && format.indexOf('[', formatIndex+1) > 0) { var match = /\%([0-9]*)\[(\^)?(\]?[^\]]*)\]/.exec(format.substring(formatIndex)); if (match) { - var maxNumCharacters = parseInt(match[1]) || Number.MAX_VALUE; - var negateScanList = (match[2]==='^'); + var maxNumCharacters = parseInt(match[1]) || Infinity; + var negateScanList = (match[2] === '^'); var scanList = match[3]; // expand "middle" dashs into character sets @@ -1722,8 +1722,8 @@ LibraryManager.library = { while ((middleDashMatch = /([^\-])\-([^\-])/.exec(scanList))) { var rangeStartCharCode = middleDashMatch[1].charCodeAt(0); var rangeEndCharCode = middleDashMatch[2].charCodeAt(0); - for (var expanded = ''; rangeStartCharCode<=rangeEndCharCode; expanded += String.fromCharCode(rangeStartCharCode++)); - scanList = scanList.replace(middleDashMatch[1]+'-'+middleDashMatch[2], expanded); + for (var expanded = ''; rangeStartCharCode <= rangeEndCharCode; expanded += String.fromCharCode(rangeStartCharCode++)); + scanList = scanList.replace(middleDashMatch[1] + '-' + middleDashMatch[2], expanded); } var argPtr = {{{ makeGetValue('varargs', 'argIndex', 'void*') }}}; |