aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/library.js')
-rw-r--r--src/library.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/library.js b/src/library.js
index 7438b0ad..61665920 100644
--- a/src/library.js
+++ b/src/library.js
@@ -3885,13 +3885,7 @@ LibraryManager.library = {
}
if (!ok) {
___setErrNo(ERRNO_CODES.EINVAL);
- return [0, 0];
- }
-
- try {
- i64Math.fromString(Pointer_stringify(start, str - start), finalBase, min, max, unsign);
- } catch(e) {
- ___setErrNo(ERRNO_CODES.ERANGE); // not quite correct
+ {{{ makeStructuralReturn(['0', '0']) }}};
}
// Set end pointer.
@@ -3899,9 +3893,13 @@ LibraryManager.library = {
{{{ makeSetValue('endptr', 0, 'str', '*') }}}
}
- var ret = i64Math.result.slice(0);
+ try {
+ i64Math.fromString(Pointer_stringify(start, str - start), finalBase, min, max, unsign);
+ } catch(e) {
+ ___setErrNo(ERRNO_CODES.ERANGE); // not quite correct
+ }
- return ret;
+ {{{ makeStructuralReturn([makeGetTempDouble(0), makeGetTempDouble(1)]) }}};
},
#endif
strtoll__deps: ['_parseInt64'],