Make some tweaks

This commit is contained in:
Sofia 2026-03-15 18:03:59 +02:00
parent 05da3db5e6
commit 167649d9e4
2 changed files with 5 additions and 3 deletions

View File

@ -8,4 +8,4 @@ function test()
return add(10)(15)
end
global c = print(test())
local c = print(test())

View File

@ -282,8 +282,10 @@ impl ClosureRunner {
}
_ => {
dbg!(&value);
for i in 0..=(*ret_len - 2) {
self.stack.insert(*func_reg + i, Value::Nil);
if *ret_len > 0 {
for i in 0..=(*ret_len - 2) {
self.stack.insert(*func_reg + i, Value::Nil);
}
}
}
}