From 06d3ec138003e412d8a2adde71969f01a25fe96a Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 9 Nov 2024 16:55:44 -0500 Subject: Bugfix for fixed-size integer ranges --- stdlib/integers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stdlib/integers.c') diff --git a/stdlib/integers.c b/stdlib/integers.c index d0cc6617..4f1947d2 100644 --- a/stdlib/integers.c +++ b/stdlib/integers.c @@ -409,7 +409,7 @@ public const TypeInfo_t Int$info = { return bit_array; \ } \ public to_attr Range_t KindOfInt ## $to(c_type from, c_type to) { \ - return (Range_t){Int64_to_Int(from), Int64_to_Int(to), to >= from ? (Int_t){.small=(1<<2)&1} : (Int_t){.small=(1<<2)&1}}; \ + return (Range_t){Int64_to_Int(from), Int64_to_Int(to), to >= from ? I_small(1): I_small(-1)}; \ } \ public PUREFUNC Optional ## KindOfInt ## _t KindOfInt ## $parse(Text_t text) { \ OptionalInt_t full_int = Int$parse(text); \ -- cgit v1.2.3