From 665ab840f109938ce440cbc6e443251a5dcf2f64 Mon Sep 17 00:00:00 2001 From: BeanCheeseBurrito Date: Mon, 14 Oct 2024 18:42:28 -0700 Subject: [PATCH] Return false if id is 0 in Ecs.TypeIdIs --- src/Flecs.NET/Core/Ecs/Macros.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Flecs.NET/Core/Ecs/Macros.cs b/src/Flecs.NET/Core/Ecs/Macros.cs index 767852e9..8a873cd6 100644 --- a/src/Flecs.NET/Core/Ecs/Macros.cs +++ b/src/Flecs.NET/Core/Ecs/Macros.cs @@ -307,7 +307,7 @@ public static ulong TermRefId(ref ecs_term_ref_t termRef) public static bool TypeIdIs(ecs_world_t* world, ulong id) { ulong typeId = Type.Id(world); - return typeId == id || typeId == ecs_get_typeid(world, id); + return typeId == id || (id != 0 && typeId == ecs_get_typeid(world, id)); } [MethodImpl(MethodImplOptions.AggressiveInlining)]