Skip to content

Commit

Permalink
hot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
smaludzi committed Aug 19, 2023
1 parent e6d7fd4 commit 441b940
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 8 additions & 1 deletion back/vmexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2926,7 +2926,14 @@ void vm_execute_push_param(vm * machine, bytecode * code)
object_arr_dim * dv = NULL;

dv = object_arr_dim_new(dims);
dv[0].elems = machine->prog->params[i - 1].string_arr_value->argc;
if (machine->prog->params[i - 1].string_arr_value != NULL)
{
dv[0].elems = machine->prog->params[i - 1].string_arr_value->argc;
}
else
{
dv[0].elems = 0;
}

mem_ptr str_array = gc_alloc_arr(machine->collector, dims, dv);

Expand Down
1 change: 0 additions & 1 deletion sample/sample_main_strarr.nev
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ func test(argv[argc] : string) -> int

func main(argv[argc] : string) -> int
{
prints(argv[0] + "\n");
test(argv);
0
}
Expand Down

0 comments on commit 441b940

Please sign in to comment.