aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lundump.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lundump.c b/lundump.c
index a1519f38..7ea55ea4 100644
--- a/lundump.c
+++ b/lundump.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lundump.c,v 1.40 2002/03/01 01:48:42 lhf Exp lhf $ 2** $Id: lundump.c,v 1.41 2002/06/06 13:22:56 lhf Exp lhf $
3** load pre-compiled Lua chunks 3** load pre-compiled Lua chunks
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -150,19 +150,20 @@ static void LoadConstants (lua_State* L, Proto* f, ZIO* Z, int swap)
150 for (i=0; i<n; i++) 150 for (i=0; i<n; i++)
151 { 151 {
152 TObject* o=&f->k[i]; 152 TObject* o=&f->k[i];
153 ttype(o)=LoadByte(L,Z); 153 int t=LoadByte(L,Z);
154 switch (ttype(o)) 154 switch (t)
155 { 155 {
156 case LUA_TNUMBER: 156 case LUA_TNUMBER:
157 nvalue(o)=LoadNumber(L,Z,swap); 157 setnvalue(o,LoadNumber(L,Z,swap));
158 break; 158 break;
159 case LUA_TSTRING: 159 case LUA_TSTRING:
160 tsvalue(o)=LoadString(L,Z,swap); 160 setsvalue(o,LoadString(L,Z,swap));
161 break; 161 break;
162 case LUA_TNIL: 162 case LUA_TNIL:
163 setnilvalue(o);
163 break; 164 break;
164 default: 165 default:
165 luaG_runerror(L,"bad constant type (%d) in %s",ttype(o),ZNAME(Z)); 166 luaG_runerror(L,"bad constant type (%d) in %s",t,ZNAME(Z));
166 break; 167 break;
167 } 168 }
168 } 169 }