diff options
| author | ruki <[email protected]> | 2017-05-18 16:28:43 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-05-18 16:28:43 +0800 |
| commit | 75cfb11546cd271ebb8b251d291ad9c7b6277b66 (patch) | |
| tree | a54d87f951beef41ae0be1be17cd47d849b2e416 /core/src | |
| parent | 102c4ce16295fe322704b6e5186f325effa989a8 (diff) | |
improve print and table.dump
Diffstat (limited to 'core/src')
| -rw-r--r-- | core/src/xmake/sandbox/interactive.c | 2 |
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))); |
