Skip to content

Commit

Permalink
fix potential bug where early variable in closure environment wasn't …
Browse files Browse the repository at this point in the history
…being marked as ptr to the garbage collector
  • Loading branch information
StavromulaBeta committed Sep 24, 2024
1 parent 0f5cc1c commit 4af78a4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cognac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1259,6 +1259,7 @@ void to_c(module_t* mod)
{
fprintf(c_source, "\t*(BOX*)_%zu_envptr = %s;\n",
reg->id, c_word_name(w->word));
fprintf(c_source, "\tgc_mark_ptr((void*)_%zu_envptr);\n", reg->id);
if (w->next)
fprintf(c_source, "\t_%zu_envptr++;\n", reg->id);
}
Expand Down

0 comments on commit 4af78a4

Please sign in to comment.