aboutsummaryrefslogtreecommitdiff
path: root/opcode.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1995-12-18 14:47:29 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1995-12-18 14:47:29 -0200
commit415ee250b5b544c91157a037a1e3c4a8f0b6cc4c (patch)
tree3d0694f50b2e613ad2ae0dd44fe28c24c99f1a2f /opcode.c
parentf188e1000ba939dd58de2e8bdfa49db2e8db571c (diff)
downloadlua-415ee250b5b544c91157a037a1e3c4a8f0b6cc4c.tar.gz
lua-415ee250b5b544c91157a037a1e3c4a8f0b6cc4c.tar.bz2
lua-415ee250b5b544c91157a037a1e3c4a8f0b6cc4c.zip
bug: luaI_findconstantbyname may change the value of lua_constant.
Diffstat (limited to 'opcode.c')
-rw-r--r--opcode.c5
1 files 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 @@
3** TecCGraf - PUC-Rio 3** TecCGraf - PUC-Rio
4*/ 4*/
5 5
6char *rcs_opcode="$Id: opcode.c,v 3.49 1995/11/10 14:12:02 roberto Exp roberto $"; 6char *rcs_opcode="$Id: opcode.c,v 3.50 1995/11/16 20:46:24 roberto Exp roberto $";
7 7
8#include <setjmp.h> 8#include <setjmp.h>
9#include <stdlib.h> 9#include <stdlib.h>
@@ -688,7 +688,8 @@ void lua_pushstring (char *s)
688*/ 688*/
689void lua_pushliteral (char *s) 689void lua_pushliteral (char *s)
690{ 690{
691 tsvalue(top) = lua_constant[luaI_findconstantbyname(s)]; 691 Word ct = luaI_findconstantbyname(s); /* this call may change lua_constant */
692 tsvalue(top) = lua_constant[ct];
692 tag(top) = LUA_T_STRING; 693 tag(top) = LUA_T_STRING;
693 incr_top; 694 incr_top;
694} 695}