fix: sanitizer checks fix (iteration 2)

This commit is contained in:
samsonium
2026-10-19 19:54:11 +03:00
parent 1289f6c150
commit 3f2f03f931
2 changed files with 30 additions and 9 deletions
+4 -1
View File
@@ -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)