From 93b63a583157986507d6907f741d4ef4cd1349c4 Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Sun, 1 Jun 2025 16:11:35 -0700 Subject: [PATCH] Prevent `new` calls that won't work as expected --- vacuum_gambit.p8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vacuum_gambit.p8 b/vacuum_gambit.p8 index 7eb9265..107a1b8 100644 --- a/vacuum_gambit.p8 +++ b/vacuum_gambit.p8 @@ -41,12 +41,13 @@ function mknew(tt) local mt,oldinit,more = {__index=tt},tt.superinit,rawget(tt, "init") tt.new=function(ret) if(not ret) ret = {} + ret.new = false setmetatable(ret, mt) if(oldinit) oldinit(ret) if (more) more(ret) return ret end - + if oldinit and more then tt.superinit = function(ret) oldinit(ret)