aboutsummaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-04-26 13:06:53 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-04-26 13:06:53 -0300
commitf79584facab6a11cd036b5f12dbfa80460eee146 (patch)
treebb4842a7bcba4598ea049db3a99c1bfa003e55dc /lvm.c
parent4abe99dc341b2ec0cb59b8fa95006e9781938eed (diff)
downloadlua-f79584facab6a11cd036b5f12dbfa80460eee146.tar.gz
lua-f79584facab6a11cd036b5f12dbfa80460eee146.tar.bz2
lua-f79584facab6a11cd036b5f12dbfa80460eee146.zip
detail
Diffstat (limited to 'lvm.c')
-rw-r--r--lvm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lvm.c b/lvm.c
index afe1a8fd..8e316627 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 2.163 2013/04/26 13:07:53 roberto Exp roberto $ 2** $Id: lvm.c,v 2.164 2013/04/26 16:03:50 roberto Exp roberto $
3** Lua virtual machine 3** Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -842,14 +842,14 @@ void luaV_execute (lua_State *L) {
842 } 842 }
843 else { /* try with floats */ 843 else { /* try with floats */
844 lua_Number ninit; lua_Number nlimit; lua_Number nstep; 844 lua_Number ninit; lua_Number nlimit; lua_Number nstep;
845 if (!tonumber(init, &ninit))
846 luaG_runerror(L, LUA_QL("for") " initial value must be a number");
847 if (!tonumber(plimit, &nlimit)) 845 if (!tonumber(plimit, &nlimit))
848 luaG_runerror(L, LUA_QL("for") " limit must be a number"); 846 luaG_runerror(L, LUA_QL("for") " limit must be a number");
849 setnvalue(plimit, nlimit); 847 setnvalue(plimit, nlimit);
850 if (!tonumber(pstep, &nstep)) 848 if (!tonumber(pstep, &nstep))
851 luaG_runerror(L, LUA_QL("for") " step must be a number"); 849 luaG_runerror(L, LUA_QL("for") " step must be a number");
852 setnvalue(pstep, nstep); 850 setnvalue(pstep, nstep);
851 if (!tonumber(init, &ninit))
852 luaG_runerror(L, LUA_QL("for") " initial value must be a number");
853 setnvalue(ra, luai_numsub(L, ninit, nstep)); 853 setnvalue(ra, luai_numsub(L, ninit, nstep));
854 } 854 }
855 ci->u.l.savedpc += GETARG_sBx(i); 855 ci->u.l.savedpc += GETARG_sBx(i);