From 9a79e796de82c0f91288bdd57c9953e4ff8eb06f Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 3 Feb 2014 12:00:30 -0500 Subject: sscanf fix and test fix --- src/library.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/library.js') 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; } -- cgit v1.2.3-18-g5258