aboutsummaryrefslogtreecommitdiff
path: root/builtins/integers.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-08-13 03:20:01 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-08-13 03:20:01 -0400
commit9edace28e2e43fb8cb8dc64191b3ed3f5a185f99 (patch)
treec7a3008bf8dc9af5537e4cc9839f7c38a1b059ab /builtins/integers.c
parent5d3ab600f1ceddd3537006b69758b2bbf2327c49 (diff)
Fix ranges
Diffstat (limited to 'builtins/integers.c')
-rw-r--r--builtins/integers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtins/integers.c b/builtins/integers.c
index b50d61c2..aa1ab4ae 100644
--- a/builtins/integers.c
+++ b/builtins/integers.c
@@ -360,7 +360,7 @@ public Int_t Int$random(Int_t min, Int_t max) {
}
public Range_t Int$to(Int_t from, Int_t to) {
- return (Range_t){from, to, Int$compare(&to, &from, &$Int) >= 0 ? (Int_t){.small=(1<<2)|1} : (Int_t){.small=(-1/4)|1}};
+ return (Range_t){from, to, Int$compare(&to, &from, &$Int) >= 0 ? (Int_t){.small=(1<<2)|1} : (Int_t){.small=(-1>>2)|1}};
}
public Int_t Int$from_text(CORD text) {