aboutsummaryrefslogtreecommitdiff
path: root/stdlib/integers.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-11-09 16:55:44 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-11-09 16:55:44 -0500
commit06d3ec138003e412d8a2adde71969f01a25fe96a (patch)
treed1a737d43bb477ea214d1446999c66225aee4deb /stdlib/integers.c
parent898bee15817573b5ab865a1dae7e52da310affa8 (diff)
Bugfix for fixed-size integer ranges
Diffstat (limited to 'stdlib/integers.c')
-rw-r--r--stdlib/integers.c2
1 files changed, 1 insertions, 1 deletions
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); \