aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-09-11 16:29:30 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-09-11 16:29:30 -0700
commitbb3be11b0e2badc5a4b17db49fb1aacd9da9cf53 (patch)
tree6fe99553e74b4a5005b55213397d89a3e2c9db1c
parentcc234035329a5d57c5b803ed0e8625187facb962 (diff)
fix 'segfault' in strtod (fixes test_sscanf)
-rw-r--r--src/library.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/library.js b/src/library.js
index 95f5a562..798a6f58 100644
--- a/src/library.js
+++ b/src/library.js
@@ -3578,7 +3578,9 @@ LibraryManager.library = {
}
if (!whole && !fraction) {
- {{{ makeSetValue('endptr', 0, 'origin', '*') }}}
+ if (endptr) {
+ {{{ makeSetValue('endptr', 0, 'origin', '*') }}}
+ }
return 0;
}