diff options
Diffstat (limited to 'lparser.c')
| -rw-r--r-- | lparser.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lparser.c,v 2.79 2010/03/12 19:14:06 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 2.80 2010/03/13 15:55:42 roberto Exp roberto $ |
| 3 | ** Lua Parser | 3 | ** Lua Parser |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -211,7 +211,7 @@ static int searchupvalue (FuncState *fs, TString *name) { | |||
| 211 | int i; | 211 | int i; |
| 212 | Upvaldesc *up = fs->f->upvalues; | 212 | Upvaldesc *up = fs->f->upvalues; |
| 213 | for (i = 0; i < fs->nups; i++) { | 213 | for (i = 0; i < fs->nups; i++) { |
| 214 | if (up[i].name == name) return i; | 214 | if (eqstr(up[i].name, name)) return i; |
| 215 | } | 215 | } |
| 216 | return -1; /* not found */ | 216 | return -1; /* not found */ |
| 217 | } | 217 | } |
| @@ -235,7 +235,7 @@ static int newupvalue (FuncState *fs, TString *name, expdesc *v) { | |||
| 235 | static int searchvar (FuncState *fs, TString *n) { | 235 | static int searchvar (FuncState *fs, TString *n) { |
| 236 | int i; | 236 | int i; |
| 237 | for (i=fs->nactvar-1; i >= 0; i--) { | 237 | for (i=fs->nactvar-1; i >= 0; i--) { |
| 238 | if (n == getlocvar(fs, i)->varname) | 238 | if (eqstr(n, getlocvar(fs, i)->varname)) |
| 239 | return i; | 239 | return i; |
| 240 | } | 240 | } |
| 241 | return -1; /* not found */ | 241 | return -1; /* not found */ |
