From edf234f8d3e0432bd708b3bffd44ccb1aeac876f Mon Sep 17 00:00:00 2001 From: jacopodl Date: Tue, 7 May 2024 17:50:39 +0200 Subject: [PATCH] fix: fixed an error causing Argon to crash when executing a currying function --- argon/vm/datatype/function.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/argon/vm/datatype/function.cpp b/argon/vm/datatype/function.cpp index ff1ab831..e024b834 100644 --- a/argon/vm/datatype/function.cpp +++ b/argon/vm/datatype/function.cpp @@ -155,7 +155,7 @@ Function *FunctionClone(const Function *func) { if (func->IsNative()) fn->native = func->native; else - fn->code = IncRef(fn->code); + fn->code = IncRef(func->code); fn->name = IncRef(func->name); fn->qname = IncRef(func->qname);