summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/global.h b/include/global.h
index 617f672f..8d6635dd 100644
--- a/include/global.h
+++ b/include/global.h
@@ -7,7 +7,8 @@
#define SET_FLAG(arr, pos) ((arr)[((u32) (pos)) >> 5] |= 1 << ((pos) & 0x1f))
#define RESET_FLAG(arr, pos) ((arr)[((u32) (pos)) >> 5] &= ~(1 << ((pos) & 0x1f)))
-#define ARRAY_LEN(arr) ((sizeof(arr) / sizeof(*arr)))
+#define ARRAY_LEN_U(arr) (u32)((sizeof(arr) / sizeof(*arr)))
+#define ARRAY_LEN(arr) (s32)(sizeof(arr) / sizeof(*arr))
// Prevent the IDE from reporting errors that the compiler/linker won't report
#ifdef __INTELLISENSE__