From 8dfbc1718db40a074b79de0b5f5dfbcea26d0b43 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Sat, 31 Aug 2024 11:41:23 +0200 Subject: [PATCH] more compat --- stew/arraybuf.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stew/arraybuf.nim b/stew/arraybuf.nim index a6f0c3c..697bfd0 100644 --- a/stew/arraybuf.nim +++ b/stew/arraybuf.nim @@ -6,11 +6,11 @@ type ArrayBuf*[N: static int, T = byte] = object ## instantiation (using an `array`). buf*: array[N, T] - when N <= int(uint8.high): + when sizeof(int) > sizeof(uint8) and N <= int(uint8.high): n*: uint8 - elif N <= int(uint16.high): + elif sizeof(int) > sizeof(uint16) and N <= int(uint16.high): n*: uint16 - elif sizeof(int) > 4 and N <= int(uint32.high): + elif sizeof(int) > sizeof(uint32) and N <= int(uint32.high): n*: uint32 else: n*: int