From 8c22564b416f0784074069a40d9fe876a706456b Mon Sep 17 00:00:00 2001 From: dzaima Date: Sun, 8 Jun 2025 23:01:16 +0300 Subject: [PATCH] better 64-bit CHECK_IA allows it to be lowered to (x>>48)==0, avoiding initializing a 64-bit constant --- src/h.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/h.h b/src/h.h index 64b56c85..47ce96e3 100644 --- a/src/h.h +++ b/src/h.h @@ -165,7 +165,7 @@ typedef size_t ux; #if USZ_64 typedef u64 usz; #define USZ_MAX ((u64)(1ULL<<48)) - #define CHECK_IA(IA,W) if((IA) > USZ_MAX) thrOOM() + #define CHECK_IA(IA,W) if((IA) >= USZ_MAX) thrOOM() #else typedef u32 usz; #define USZ_MAX ((u32)((1LL<<32)-1))