aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-02-03 12:00:30 -0500
committerAlon Zakai <alonzakai@gmail.com>2014-02-03 12:01:24 -0500
commit9a79e796de82c0f91288bdd57c9953e4ff8eb06f (patch)
tree96dc76224d4fc86c6dfbc9366b63edcd80902ef8 /src/library.js
parent3700ece5ebe8d136c3f70c0f4c49745a6055470c (diff)
sscanf fix and test fix
Diffstat (limited to 'src/library.js')
-rw-r--r--src/library.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js
index 901c9474..26ce8457 100644
--- a/src/library.js
+++ b/src/library.js
@@ -1641,8 +1641,8 @@ LibraryManager.library = {
for (var i = 0; i < maxx; i++) {
next = get();
{{{ makeSetValue('argPtr++', 0, 'next', 'i8') }}};
+ if (next === 0) return i > 0 ? fields : fields-1; // we failed to read the full length of this field
}
- if (next === 0) return fields-1; // we failed to read this field
formatIndex += nextC - formatIndex + 1;
continue;
}