diff options
author | Roger Braun <roger@rogerbraun.net> | 2013-02-13 22:55:36 +0100 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2013-02-21 08:43:57 +0100 |
commit | 31b7152b355ef7244ce5060f2da618e7ad0880a0 (patch) | |
tree | 2a69ec30809f693d8d416624714af6671cb8c3ef /src | |
parent | 5f5e17f88b52e186f98546f0d3fb0327c211328a (diff) |
Handle %c in sscanf.
Diffstat (limited to 'src')
-rw-r--r-- | src/library.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js index 900b3fee..284bf92a 100644 --- a/src/library.js +++ b/src/library.js @@ -2491,6 +2491,16 @@ LibraryManager.library = { continue; } + if (format[formatIndex] === '%' && format[formatIndex+1] == 'c') { + var argPtr = {{{ makeGetValue('varargs', 'argIndex', 'void*') }}}; + argIndex += Runtime.getNativeFieldSize('void*'); + fields++; + next = get(); + {{{ makeSetValue('argPtr', 0, 'next', 'i8') }}} + formatIndex += 2; + continue; + } + // remove whitespace while (1) { next = get(); |