add checksig in OP_FORLOOP, see issue #568

This commit is contained in:
Cloud Wu
2017-01-23 16:50:34 +08:00
parent 9e90ee2dde
commit af6b5609de

View File

@@ -1201,6 +1201,7 @@ void luaV_execute (lua_State *L) {
}
}
vmcase(OP_FORLOOP) {
lua_checksig(L);
if (ttisinteger(ra)) { /* integer loop? */
lua_Integer step = ivalue(ra + 2);
lua_Integer idx = intop(+, ivalue(ra), step); /* increment index */