summaryrefslogtreecommitdiff
path: root/src/lvm.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-22 23:19:22 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-23 00:52:02 +1000
commit128ae8cc451126ee7201de7efb6cc0c39fb1a2b4 (patch)
treebcda9fa49eca0aeb2859d0daf252ed01a121d9ce /src/lvm.js
parentb525c305b524f5b3ffaba3187ccc828d332aa835 (diff)
downloadfengari-128ae8cc451126ee7201de7efb6cc0c39fb1a2b4.tar.gz
fengari-128ae8cc451126ee7201de7efb6cc0c39fb1a2b4.tar.bz2
fengari-128ae8cc451126ee7201de7efb6cc0c39fb1a2b4.zip
Introduce luaO_tostring
Diffstat (limited to 'src/lvm.js')
-rw-r--r--src/lvm.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lvm.js b/src/lvm.js
index 83feb9b..0081376 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -973,8 +973,8 @@ const tostring = function(L, i) {
if (o.ttisstring()) return true;
- if (cvt2str(o) && !isNaN(o.value)) {
- L.stack[i] = new lobject.TValue(CT.LUA_TLNGSTR, lstring.luaS_bless(L, defs.to_luastring(`${o.value}`)));
+ if (cvt2str(o)) {
+ L.stack[i] = lobject.luaO_tostring(L, o);
return true;
}