From f3e323f0f0c8fd0f688692ecd313b912427646e2 Mon Sep 17 00:00:00 2001 From: Luis Michaelis Date: Sun, 15 Sep 2024 10:24:10 +0200 Subject: [PATCH] [#11] fix(DaedalusVm): allow `Pop` to return any `DaedalusInstance` --- ZenKit/DaedalusVm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZenKit/DaedalusVm.cs b/ZenKit/DaedalusVm.cs index a7cea06..ef0bb8d 100644 --- a/ZenKit/DaedalusVm.cs +++ b/ZenKit/DaedalusVm.cs @@ -673,7 +673,7 @@ private T Pop() if (typeof(T) == typeof(int) || typeof(T) == typeof(bool)) return (T)(object)Native.ZkDaedalusVm_popInt(Handle); if (typeof(T) == typeof(float)) return (T)(object)Native.ZkDaedalusVm_popFloat(Handle); - if (typeof(T).IsSubclassOf(typeof(DaedalusInstance))) + if (typeof(T) == typeof(DaedalusInstance) || typeof(T).IsSubclassOf(typeof(DaedalusInstance))) return (T)(object)DaedalusInstance.FromNative(Native.ZkDaedalusVm_popInstance(Handle)); if (typeof(T) == typeof(void)) return (T)new object();