diff --git a/lparser.c b/lparser.c index 87a1dab4..ef3eedf8 100644 --- a/lparser.c +++ b/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 2.127 2012/05/08 13:53:33 roberto Exp roberto $ +** $Id: lparser.c,v 2.128 2012/05/20 14:51:23 roberto Exp roberto $ ** Lua Parser ** See Copyright Notice in lua.h */ @@ -245,7 +245,7 @@ static int newupvalue (FuncState *fs, TString *name, expdesc *v) { static int searchvar (FuncState *fs, TString *n) { int i; - for (i=fs->nactvar-1; i >= 0; i--) { + for (i = cast_int(fs->nactvar) - 1; i >= 0; i--) { if (luaS_eqstr(n, getlocvar(fs, i)->varname)) return i; }