haku2: add stats + fix crash w uninit vm

This commit is contained in:
りき萌 2025-06-16 16:39:54 +02:00
parent e667c6336a
commit 00a48527ca
12 changed files with 88 additions and 71 deletions

View file

@ -54,6 +54,6 @@ fn renderRec(vm: *Vm, canvas: *Canvas, val: Value, depth: usize, max_depth: usiz
}
pub fn render(vm: *Vm, canvas: *Canvas, max_depth: usize) !void {
const val = vm.stack[vm.stack_top - 1];
const val = vm.top();
try renderRec(vm, canvas, val, 0, max_depth);
}