aboutsummaryrefslogtreecommitdiff
path: root/src/lobject.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lobject.js')
-rw-r--r--src/lobject.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lobject.js b/src/lobject.js
index e7b716e..fad3b73 100644
--- a/src/lobject.js
+++ b/src/lobject.js
@@ -461,7 +461,8 @@ const luaO_tostring = function(L, obj) {
};
const pushstr = function(L, str) {
- L.stack[L.top++] = new TValue(CT.LUA_TLNGSTR, lstring.luaS_new(L, str));
+ ldo.luaD_inctop(L);
+ L.stack[L.top-1] = new TValue(CT.LUA_TLNGSTR, lstring.luaS_new(L, str));
};
const luaO_pushvfstring = function(L, fmt, argp) {
@@ -488,10 +489,12 @@ const luaO_pushvfstring = function(L, fmt, argp) {
break;
case char['d']:
case char['I']:
- L.stack[L.top++] = luaO_tostring(L, new TValue(CT.LUA_TNUMINT, argp[a++]));
+ ldo.luaD_inctop(L);
+ L.stack[L.top-1] = luaO_tostring(L, new TValue(CT.LUA_TNUMINT, argp[a++]));
break;
case char['f']:
- L.stack[L.top++] = luaO_tostring(L, new TValue(CT.LUA_TNUMFLT, argp[a++]));
+ ldo.luaD_inctop(L);
+ L.stack[L.top-1] = luaO_tostring(L, new TValue(CT.LUA_TNUMFLT, argp[a++]));
break;
// case char['p']:
case char['U']: