diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-06-04 15:10:54 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-06-04 15:10:54 -0700 |
commit | d8d349bb70369e0dcc7f1035549f68ec731c9f84 (patch) | |
tree | 253c625b972de401823e0ca75155f158d6c9dd7f /src | |
parent | 4535b975f8fd48bc6e7fb8dcbf3e25118f5f8b28 (diff) | |
parent | e16878f2b6eb226b3b161c18301c79450f5d5d76 (diff) |
Merge pull request #1244 from onnoj/incoming
Fixed Issue #1241: _scanString not supporting upper case format specifie...
Diffstat (limited to 'src')
-rw-r--r-- | src/library.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/library.js b/src/library.js index ef8afaef..07368ee7 100644 --- a/src/library.js +++ b/src/library.js @@ -2617,7 +2617,8 @@ LibraryManager.library = { var curr = 0; var buffer = []; // Read characters according to the format. floats are trickier, they may be in an unfloat state in the middle, then be a valid float later - if (type == 'f' || type == 'e' || type == 'g' || type == 'E') { + if (type == 'f' || type == 'e' || type == 'g' || + type == 'F' || type == 'E' || type == 'G') { var last = 0; next = get(); while (next > 0) { @@ -2639,7 +2640,7 @@ LibraryManager.library = { (type == 's' || ((type === 'd' || type == 'u' || type == 'i') && ((next >= {{{ charCode('0') }}} && next <= {{{ charCode('9') }}}) || (first && next == {{{ charCode('-') }}}))) || - (type === 'x' && (next >= {{{ charCode('0') }}} && next <= {{{ charCode('9') }}} || + ((type === 'x' || type === 'X') && (next >= {{{ charCode('0') }}} && next <= {{{ charCode('9') }}} || next >= {{{ charCode('a') }}} && next <= {{{ charCode('f') }}} || next >= {{{ charCode('A') }}} && next <= {{{ charCode('F') }}}))) && (formatIndex >= format.length || next !== format[formatIndex].charCodeAt(0))) { // Stop when we read something that is coming up @@ -2669,11 +2670,15 @@ LibraryManager.library = { {{{ makeSetValue('argPtr', 0, 'parseInt(text, 10)', 'i32') }}}; } break; + case 'X': case 'x': {{{ makeSetValue('argPtr', 0, 'parseInt(text, 16)', 'i32') }}} break; + case 'F': case 'f': + case 'E': case 'e': + case 'G': case 'g': case 'E': // fallthrough intended |