Skip to content

Commit

Permalink
fix: corrected an error that could lead to interpreter crash under ce…
Browse files Browse the repository at this point in the history
…rtain conditions
  • Loading branch information
jacopodl committed Mar 13, 2024
1 parent 3f5c713 commit 62f1991
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions argon/vm/datatype/function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ Function *FunctionClone(const Function *func) {
if (fn != nullptr) {
fn->native = func->native;

if (!func->IsNative())
IncRef(fn->code);

fn->name = IncRef(func->name);
fn->qname = IncRef(func->qname);
fn->doc = IncRef(func->doc);
Expand Down

0 comments on commit 62f1991

Please sign in to comment.