Skip to content

Commit

Permalink
fix(DaedalusVm): properly check SvmInstance type in InitInstance<T>
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Apr 1, 2024
1 parent 48a12a6 commit f329169
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ZenKit/DaedalusVm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public T InitInstance<T>(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)) ??
Expand Down

0 comments on commit f329169

Please sign in to comment.