diff options
author | Lua Team <team@lua.org> | 2006-01-24 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 2006-01-24 12:00:00 +0000 |
commit | b487a3dce43e449acf3852ec56345e2860cfeab7 (patch) | |
tree | 5aa380efa69c039aafa812cf9edeb432bf27a885 /src/lvm.c | |
parent | 4f266285f998d0d14c4e83cc29772f0de1a7fbba (diff) | |
download | lua-github-5.1-rc2.tar.gz |
Lua 5.1-rc25.1-rc2
Diffstat (limited to 'src/lvm.c')
-rw-r--r-- | src/lvm.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,5 +1,5 @@ /* -** $Id: lvm.c,v 2.61 2006/01/10 12:50:00 roberto Exp $ +** $Id: lvm.c,v 2.62 2006/01/23 19:51:43 roberto Exp $ ** Lua virtual machine ** See Copyright Notice in lua.h */ @@ -95,7 +95,8 @@ static void callTMres (lua_State *L, StkId res, const TValue *f, -static void callTM (lua_State *L, const TValue *f, const TValue *p1, const TValue *p2, const TValue *p3) { +static void callTM (lua_State *L, const TValue *f, const TValue *p1, + const TValue *p2, const TValue *p3) { setobj2s(L, L->top, f); /* push function */ setobj2s(L, L->top+1, p1); /* 1st argument */ setobj2s(L, L->top+2, p2); /* 2nd argument */ @@ -649,7 +650,8 @@ void luaV_execute (lua_State *L, int nexeccalls) { lua_Number step = nvalue(ra+2); lua_Number idx = luai_numadd(nvalue(ra), step); /* increment index */ lua_Number limit = nvalue(ra+1); - if (step > 0 ? luai_numle(idx, limit) : luai_numle(limit, idx)) { + if (luai_numlt(0, step) ? luai_numle(idx, limit) + : luai_numle(limit, idx)) { dojump(L, pc, GETARG_sBx(i)); /* jump back */ setnvalue(ra, idx); /* update internal index... */ setnvalue(ra+3, idx); /* ...and external index */ |