aboutsummaryrefslogtreecommitdiff
path: root/lua.stx
diff options
context:
space:
mode:
Diffstat (limited to 'lua.stx')
-rw-r--r--lua.stx8
1 files changed, 4 insertions, 4 deletions
diff --git a/lua.stx b/lua.stx
index dfb80ce3..2f650f4e 100644
--- a/lua.stx
+++ b/lua.stx
@@ -1,6 +1,6 @@
1%{ 1%{
2/* 2/*
3** $Id: lua.stx,v 1.4 1997/09/22 20:53:20 roberto Exp roberto $ 3** $Id: lua.stx,v 1.5 1997/09/24 19:43:11 roberto Exp roberto $
4** Syntax analizer and code generator 4** Syntax analizer and code generator
5** See Copyright Notice in lua.h 5** See Copyright Notice in lua.h
6*/ 6*/
@@ -203,13 +203,13 @@ static int next_constant (State *cs)
203static int string_constant (TaggedString *s, State *cs) 203static int string_constant (TaggedString *s, State *cs)
204{ 204{
205 TProtoFunc *f = cs->f; 205 TProtoFunc *f = cs->f;
206 int c = s->u.s.constindex; 206 int c = s->constindex;
207 if (!(0 <= c && c < f->nconsts && 207 if (!(c < f->nconsts &&
208 ttype(&f->consts[c]) == LUA_T_STRING && tsvalue(&f->consts[c]) == s)) { 208 ttype(&f->consts[c]) == LUA_T_STRING && tsvalue(&f->consts[c]) == s)) {
209 c = next_constant(cs); 209 c = next_constant(cs);
210 ttype(&f->consts[c]) = LUA_T_STRING; 210 ttype(&f->consts[c]) = LUA_T_STRING;
211 tsvalue(&f->consts[c]) = s; 211 tsvalue(&f->consts[c]) = s;
212 s->u.s.constindex = c; /* hint for next time */ 212 s->constindex = c; /* hint for next time */
213 } 213 }
214 return c; 214 return c;
215} 215}