From 415ee250b5b544c91157a037a1e3c4a8f0b6cc4c Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 18 Dec 1995 14:47:29 -0200 Subject: bug: luaI_findconstantbyname may change the value of lua_constant. --- opcode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opcode.c b/opcode.c index 5ddfa339..3d1b4372 100644 --- a/opcode.c +++ b/opcode.c @@ -3,7 +3,7 @@ ** TecCGraf - PUC-Rio */ -char *rcs_opcode="$Id: opcode.c,v 3.49 1995/11/10 14:12:02 roberto Exp roberto $"; +char *rcs_opcode="$Id: opcode.c,v 3.50 1995/11/16 20:46:24 roberto Exp roberto $"; #include #include @@ -688,7 +688,8 @@ void lua_pushstring (char *s) */ void lua_pushliteral (char *s) { - tsvalue(top) = lua_constant[luaI_findconstantbyname(s)]; + Word ct = luaI_findconstantbyname(s); /* this call may change lua_constant */ + tsvalue(top) = lua_constant[ct]; tag(top) = LUA_T_STRING; incr_top; } -- cgit v1.2.3-55-g6feb