From f329169cb0e6ffcccdad381dbac4a450d2ae470f Mon Sep 17 00:00:00 2001 From: Luis Michaelis Date: Mon, 1 Apr 2024 11:17:44 +0200 Subject: [PATCH] fix(DaedalusVm): properly check `SvmInstance` type in `InitInstance` --- ZenKit/DaedalusVm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZenKit/DaedalusVm.cs b/ZenKit/DaedalusVm.cs index e6f7aed..a7cea06 100644 --- a/ZenKit/DaedalusVm.cs +++ b/ZenKit/DaedalusVm.cs @@ -211,7 +211,7 @@ public T InitInstance(DaedalusSymbol symbol) else if (typeof(T) == typeof(FightAiInstance)) type = DaedalusInstanceType.FightAi; else if (typeof(T) == typeof(SoundEffectInstance)) type = DaedalusInstanceType.SoundEffect; else if (typeof(T) == typeof(SoundSystemInstance)) type = DaedalusInstanceType.SoundSystem; - else if (typeof(T) == typeof(InvalidOperationException)) type = DaedalusInstanceType.Svm; + else if (typeof(T) == typeof(SvmInstance)) type = DaedalusInstanceType.Svm; else throw new NotSupportedException("Must be DaedalusInstance"); var ptr = DaedalusInstance.FromNative(Native.ZkDaedalusVm_initInstance(Handle, symbol.Handle, type)) ??