summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorruki <[email protected]>2017-05-18 16:28:43 +0800
committerruki <[email protected]>2017-05-18 16:28:43 +0800
commit75cfb11546cd271ebb8b251d291ad9c7b6277b66 (patch)
treea54d87f951beef41ae0be1be17cd47d849b2e416 /core/src
parent102c4ce16295fe322704b6e5186f325effa989a8 (diff)
improve print and table.dump
Diffstat (limited to 'core/src')
-rw-r--r--core/src/xmake/sandbox/interactive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/xmake/sandbox/interactive.c b/core/src/xmake/sandbox/interactive.c
index 258256d0e..c4fcaef9b 100644
--- a/core/src/xmake/sandbox/interactive.c
+++ b/core/src/xmake/sandbox/interactive.c
@@ -338,7 +338,7 @@ tb_int_t xm_sandbox_interactive(lua_State* lua)
* stack: arg1(sandbox_scope) [results] -> ...
* after: arg1(sandbox_scope) print [results] -> ...
*/
- lua_getglobal(lua, "print");
+ lua_getfield(lua, 1, "print"); // load print() from sandbox_scope
lua_insert(lua, -(count + 1));
if (lua_pcall(lua, count, 0, 0) != 0)
tb_printl(lua_pushfstring(lua, "error calling " LUA_QL("print") " (%s)", lua_tostring(lua, -1)));