Skip to content

Commit

Permalink
fx
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Jan 1, 2023
1 parent f378d63 commit 1847e08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -32773,7 +32773,7 @@ static JSValue js_create_function(JSContext *ctx, JSFunctionDef *fd)
}
} else {
b->vardefs = (void *)((uint8_t*)b + vardefs_offset);
if (fd->arg_count > 0) {
if (fd->vars && fd->arg_count > 0) {
memcpy(b->vardefs, fd->args, fd->arg_count * sizeof(fd->args[0]));
memcpy(b->vardefs + fd->arg_count, fd->vars, fd->var_count * sizeof(fd->vars[0]));
}
Expand Down

0 comments on commit 1847e08

Please sign in to comment.