diff options
Diffstat (limited to 'lua.c')
| -rw-r--r-- | lua.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.c,v 1.172 2009/02/19 17:15:35 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.173 2009/06/18 18:59:58 roberto Exp roberto $ |
| 3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -218,6 +218,7 @@ static void dotty (lua_State *L) { | |||
| 218 | if (status == LUA_OK) status = docall(L, 0, 0); | 218 | if (status == LUA_OK) status = docall(L, 0, 0); |
| 219 | report(L, status); | 219 | report(L, status); |
| 220 | if (status == LUA_OK && lua_gettop(L) > 0) { /* any result to print? */ | 220 | if (status == LUA_OK && lua_gettop(L) > 0) { /* any result to print? */ |
| 221 | luaL_checkstack(L, LUA_MINSTACK, "too many results to print"); | ||
| 221 | lua_getglobal(L, "print"); | 222 | lua_getglobal(L, "print"); |
| 222 | lua_insert(L, 1); | 223 | lua_insert(L, 1); |
| 223 | if (lua_pcall(L, lua_gettop(L)-1, 0, 0) != LUA_OK) | 224 | if (lua_pcall(L, lua_gettop(L)-1, 0, 0) != LUA_OK) |
