I have found some bugs:
1. File "sqcompiler.cpp", all calls as:
_fs->AddInstruction(_OP_NEWOBJ, _fs->PushTarget(),0,NOT_TABLE);
here one argument before NOT_TABLE is missed. It works because NOT_TABLE==0
2. File "sqvm.cpp", call of MT_NEXTI for OT_INSTANCE in SQVM::FOREACH_OP:
after calling '_nexti' metamethod next iterator used for call of Get:
if(CallMetaMethod(closure, MT_NEXTI, 2, itr)) {
o4 = o2 = itr;
if(type(itr) == OT_NULL) _FINISH(exitpos);
if(!Get(o1, itr, o3, 0, DONT_FALL_BACK)) {
as a result, first item in enumeration will be missed.