From 945594c3663d36315b3f666c99698709c930eb0f Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Tue, 8 Aug 2023 15:05:59 +0300 Subject: [PATCH] Fixing generic structs support --- src/codegen.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen.inc.php b/src/codegen.inc.php index d650b49..ae5ac93 100644 --- a/src/codegen.inc.php +++ b/src/codegen.inc.php @@ -393,7 +393,7 @@ function var_sync($fname, \mtgType $type, $buf, array $tokens, $opts) else if($type instanceof \mtgMetaStruct) { if(array_key_exists('virtual', $tokens)) - $str .= "{$fname} = ({$type->getName()})MetaSync.SyncGeneric({$buf}, {$fname}, \"{$key_name}\", {$opts});\n"; + $str .= "{$fname} = MetaSync.SyncGeneric({$buf}, {$fname}, \"{$key_name}\", {$opts});\n"; else $str .= "MetaSync.Sync({$buf}, ref {$fname}, \"{$key_name}\", {$opts});\n"; }