From 09beea4a092bc3d45bc94cd2b1d9280b7b15ce91 Mon Sep 17 00:00:00 2001 From: Daniel Hajjar <33489389+DanTGL@users.noreply.github.com> Date: Mon, 15 Jul 2024 11:48:30 +0200 Subject: [PATCH] Update cLib_calcTimer (#2179) --- include/SSystem/SComponent/c_lib.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/SSystem/SComponent/c_lib.h b/include/SSystem/SComponent/c_lib.h index 3d15cd82803..3e2840ad273 100644 --- a/include/SSystem/SComponent/c_lib.h +++ b/include/SSystem/SComponent/c_lib.h @@ -87,8 +87,7 @@ inline T cLib_maxLimit(T val, T max) { template T cLib_calcTimer(T* value) { - // Casting 0 to u16 may not be correct, but is matching for now - if (*value != (u16)0) { + if (*(T*)value != 0) { *value = *value - 1; } return *value;