From 667040ea358e484a5a88abd16cc013e4d75f123d Mon Sep 17 00:00:00 2001 From: Madpwnhammer Date: Tue, 21 Mar 2023 15:40:29 +0300 Subject: [PATCH] Using special case when initializing []any in bindings --- tpl/macro.twig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tpl/macro.twig b/tpl/macro.twig index 4ec2e4d..844996b 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -378,6 +378,9 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack {%- endif -%} {%- if type is instanceof('\\mtgArrType') -%} + {%- if type == 'any[]'-%} + {{native}} = ValList.New(frm.vm); + {%~ endif -%} var dvl = (ValList){{value}}._obj; {{native}}.Clear(); for(int i=0;i