diff options
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1681,7 +1681,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) { | |||
1681 | int stopnow; | 1681 | int stopnow; |
1682 | if (unlikely(!forlimit(plimit, &ilimit, 1, &stopnow))) { | 1682 | if (unlikely(!forlimit(plimit, &ilimit, 1, &stopnow))) { |
1683 | savestate(L, ci); /* for the error message */ | 1683 | savestate(L, ci); /* for the error message */ |
1684 | luaG_runerror(L, "'for' limit must be a number"); | 1684 | luaG_forerror(L, plimit, "limit"); |
1685 | } | 1685 | } |
1686 | initv = (stopnow ? 0 : ivalue(init)); | 1686 | initv = (stopnow ? 0 : ivalue(init)); |
1687 | setivalue(plimit, ilimit); | 1687 | setivalue(plimit, ilimit); |
@@ -1732,13 +1732,13 @@ void luaV_execute (lua_State *L, CallInfo *ci) { | |||
1732 | lua_Number ninit; lua_Number nlimit; lua_Number nstep; | 1732 | lua_Number ninit; lua_Number nlimit; lua_Number nstep; |
1733 | savestate(L, ci); /* in case of errors */ | 1733 | savestate(L, ci); /* in case of errors */ |
1734 | if (unlikely(!tonumber(plimit, &nlimit))) | 1734 | if (unlikely(!tonumber(plimit, &nlimit))) |
1735 | luaG_runerror(L, "'for' limit must be a number"); | 1735 | luaG_forerror(L, plimit, "limit"); |
1736 | setfltvalue(plimit, nlimit); | 1736 | setfltvalue(plimit, nlimit); |
1737 | if (unlikely(!tonumber(pstep, &nstep))) | 1737 | if (unlikely(!tonumber(pstep, &nstep))) |
1738 | luaG_runerror(L, "'for' step must be a number"); | 1738 | luaG_forerror(L, pstep, "step"); |
1739 | setfltvalue(pstep, nstep); | 1739 | setfltvalue(pstep, nstep); |
1740 | if (unlikely(!tonumber(init, &ninit))) | 1740 | if (unlikely(!tonumber(init, &ninit))) |
1741 | luaG_runerror(L, "'for' initial value must be a number"); | 1741 | luaG_forerror(L, init, "initial value"); |
1742 | setfltvalue(init, luai_numsub(L, ninit, nstep)); | 1742 | setfltvalue(init, luai_numsub(L, ninit, nstep)); |
1743 | } | 1743 | } |
1744 | pc += GETARG_Bx(i); | 1744 | pc += GETARG_Bx(i); |