Skip to content

Commit

Permalink
fix: Globals need to be initialized separately
Browse files Browse the repository at this point in the history
  • Loading branch information
phorward committed Dec 15, 2023
1 parent 9d82076 commit 17814b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/value/parselet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ impl Parselet {

if main {
assert!(self.signature.is_empty());
thread.globals.resize(self.locals, crate::value!(void));
thread
.globals
.resize_with(self.locals, || crate::value!(void));
}

let args_len = args.len();
Expand Down

0 comments on commit 17814b1

Please sign in to comment.