@ -1681,7 +1681,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
int stopnow ;
int stopnow ;
if ( unlikely ( ! forlimit ( plimit , & ilimit , 1 , & stopnow ) ) ) {
if ( unlikely ( ! forlimit ( plimit , & ilimit , 1 , & stopnow ) ) ) {
savestate ( L , ci ) ; /* for the error message */
savestate ( L , ci ) ; /* for the error message */
luaG_run error ( L , " 'for' limit must be a number " ) ;
luaG_fo rerror ( L , plimit , " limit " ) ;
}
}
initv = ( stopnow ? 0 : ivalue ( init ) ) ;
initv = ( stopnow ? 0 : ivalue ( init ) ) ;
setivalue ( plimit , ilimit ) ;
setivalue ( plimit , ilimit ) ;
@ -1732,13 +1732,13 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
lua_Number ninit ; lua_Number nlimit ; lua_Number nstep ;
lua_Number ninit ; lua_Number nlimit ; lua_Number nstep ;
savestate ( L , ci ) ; /* in case of errors */
savestate ( L , ci ) ; /* in case of errors */
if ( unlikely ( ! tonumber ( plimit , & nlimit ) ) )
if ( unlikely ( ! tonumber ( plimit , & nlimit ) ) )
luaG_run error ( L , " 'for' limit must be a number " ) ;
luaG_fo rerror ( L , plimit , " limit " ) ;
setfltvalue ( plimit , nlimit ) ;
setfltvalue ( plimit , nlimit ) ;
if ( unlikely ( ! tonumber ( pstep , & nstep ) ) )
if ( unlikely ( ! tonumber ( pstep , & nstep ) ) )
luaG_run error ( L , " 'for' step must be a number " ) ;
luaG_fo rerror ( L , pstep , " step " ) ;
setfltvalue ( pstep , nstep ) ;
setfltvalue ( pstep , nstep ) ;
if ( unlikely ( ! tonumber ( init , & ninit ) ) )
if ( unlikely ( ! tonumber ( init , & ninit ) ) )
luaG_run error ( L , " 'for' initial value must be a number " ) ;
luaG_fo rerror ( L , init , " initial value " ) ;
setfltvalue ( init , luai_numsub ( L , ninit , nstep ) ) ;
setfltvalue ( init , luai_numsub ( L , ninit , nstep ) ) ;
}
}
pc + = GETARG_Bx ( i ) ;
pc + = GETARG_Bx ( i ) ;