Skip to content

Commit

Permalink
fix(import): exported count doesn't need to be u8
Browse files Browse the repository at this point in the history
  • Loading branch information
giann committed Sep 9, 2023
1 parent 2e7b8ea commit a41b963
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vm.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1623,14 +1623,14 @@ pub const VM = struct {
};

// Top of stack is how many export we got
var exported_count: u8 = @intCast(vm.peek(0).integer());
var exported_count = vm.peek(0).integer();

// Copy them to this vm globals
var import_cache = std.ArrayList(Value).init(self.gc.allocator);
if (exported_count > 0) {
var i: u8 = exported_count;
var i = exported_count;
while (i > 0) : (i -= 1) {
const global = vm.peek(i);
const global = vm.peek(@intCast(i));
self.globals.append(global) catch |e| {
panic(e);
unreachable;
Expand Down

0 comments on commit a41b963

Please sign in to comment.