diff --git a/src/entity.zig b/src/entity.zig index 91aeaca..ec7b15e 100644 --- a/src/entity.zig +++ b/src/entity.zig @@ -341,7 +341,8 @@ pub fn Entity(comptime ctx: anytype) type { pub fn set(self: Self, comptime T: anytype, value: meta.AnyToType(T)) void { const id = Context.anyToId(T); - _ = c.ecs_set_id(self.world.raw, self.raw, id, @sizeOf(@TypeOf(value)), &value); + const size = @sizeOf(@TypeOf(value)); + _ = c.ecs_set_id(self.world.raw, self.raw, id, size, @ptrCast(&value)); } /// The `fmt` parameter can be one of: