Skip to content

Commit

Permalink
[#11] fix(DaedalusVm): allow Pop to return any DaedalusInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichaelis committed Sep 15, 2024
1 parent 4a91370 commit f3e323f
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 @@ -673,7 +673,7 @@ private T Pop<T>()
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();

Expand Down

0 comments on commit f3e323f

Please sign in to comment.