fix bug in codegen: foreach/forindex(id;vec/hash) may cause segmentation fault because of incorrect generated operand

This commit is contained in:
ValKmjolnir
2022-04-16 19:45:55 +08:00
parent ca073499ae
commit fc25dd69e1
5 changed files with 88 additions and 14 deletions
+2
View File
@@ -512,6 +512,8 @@ inline void nasal_vm::opr_meq()
{
mem_addr[0]=(--gc.top)[0]; // pop old mem_addr[0] and replace it
mem_addr=nullptr;
if(imm[pc])
--gc.top;
}
inline void nasal_vm::opr_eq()
{