diff options
| author | Ben Hutchings <ben@decadent.org.uk> | 2019-08-17 17:36:51 +0100 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2022-07-31 08:53:08 +0100 |
| commit | 4c1e47b272274972556d7790384998e593d0ae57 (patch) | |
| tree | b13781c46e94ce5900fb2100804d52cad2d870ab | |
| parent | cd338a1a35394a7abfd517569e908b54bf657aaa (diff) | |
| download | puzzles-4c1e47b272274972556d7790384998e593d0ae57.zip puzzles-4c1e47b272274972556d7790384998e593d0ae57.tar.gz puzzles-4c1e47b272274972556d7790384998e593d0ae57.tar.bz2 puzzles-4c1e47b272274972556d7790384998e593d0ae57.tar.xz | |
Bridges: Fix off-by-one in WITHIN()
WITHIN() used to treat the min and max as inclusive bounds but was
changed to treat the max as exclusive, apparently accidentally.
Fixed: 5f5b284c0bdd ("Use C99 bool within source modules.")
| -rw-r--r-- | bridges.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -183,7 +183,7 @@ struct game_state { #define GRIDCOUNT(s,x,y,f) ((GRID(s,x,y) & (f)) ? (INDEX(s,lines,x,y)) : 0) -#define WITHIN2(x,min,max) ((x) >= (min) && (x) < (max)) +#define WITHIN2(x,min,max) ((x) >= (min) && (x) <= (max)) #define WITHIN(x,min,max) ((min) > (max) ? \ WITHIN2(x,max,min) : WITHIN2(x,min,max)) |