diff options
-rw-r--r-- | ldo.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 1.125 2001/02/22 17:15:18 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.126 2001/02/22 18:59:59 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -335,9 +335,8 @@ struct lua_longjmp { | |||
335 | 335 | ||
336 | 336 | ||
337 | static void message (lua_State *L, const char *s) { | 337 | static void message (lua_State *L, const char *s) { |
338 | const TObject *em = luaH_getstr(L->gt, luaS_newliteral(L, LUA_ERRORMESSAGE)); | 338 | luaV_getglobal(L, luaS_newliteral(L, LUA_ERRORMESSAGE), L->top); |
339 | if (ttype(em) == LUA_TFUNCTION) { | 339 | if (ttype(L->top) == LUA_TFUNCTION) { |
340 | setobj(L->top, em); | ||
341 | incr_top; | 340 | incr_top; |
342 | setsvalue(L->top, luaS_new(L, s)); | 341 | setsvalue(L->top, luaS_new(L, s)); |
343 | incr_top; | 342 | incr_top; |