summaryrefslogtreecommitdiff
path: root/src/llex.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/llex.js')
-rw-r--r--src/llex.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/llex.js b/src/llex.js
index 19f2c05..464c98e 100644
--- a/src/llex.js
+++ b/src/llex.js
@@ -236,8 +236,8 @@ const read_numeral = function(ls, seminfo) {
// save(ls, 0);
- let obj = lobject.luaO_str2num(ls.buff.buffer);
- if (obj === false) /* format error? */
+ let obj = new lobject.TValue();
+ if (lobject.luaO_str2num(ls.buff.buffer, obj) === 0) /* format error? */
lexerror(ls, defs.to_luastring("malformed number", true), R.TK_FLT);
if (obj.ttisinteger()) {
seminfo.i = obj.value;