fix: sanitizer checks fix (iteration 2)
This commit is contained in:
+4
-1
@@ -660,7 +660,7 @@ int fzl_vm_run(fzl_vm_t *vm)
|
||||
|
||||
case FZL_OPCODE_JMP:
|
||||
{
|
||||
if (vm->ops_count >= vm->ip)
|
||||
if (vm->ops_count <= vm->ip)
|
||||
{
|
||||
snprintf(last_err, sizeof(last_err),
|
||||
"runtime error - expected JMP addr");
|
||||
@@ -1011,6 +1011,9 @@ void fzl_freevm(fzl_vm_t *vm)
|
||||
if (!vm)
|
||||
return;
|
||||
|
||||
while (vm->etop > 0)
|
||||
fzl_freeenv(vm->estack[--vm->etop]);
|
||||
|
||||
for (size_t i = 0; i < vm->consts_count; i++)
|
||||
{
|
||||
if (vm->consts[i].type == FZL_CONSTTYPE_STRING)
|
||||
|
||||
Reference in New Issue
Block a user