aboutsummaryrefslogtreecommitdiff
path: root/rect.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2005-06-21 08:15:53 +0000
committerSimon Tatham <anakin@pobox.com>2005-06-21 08:15:53 +0000
commit6dcbacc2582e5aabae768e6df496525f67eed8a6 (patch)
tree0ddc419069e90bb869568392339bc8d57ae070a6 /rect.c
parentc98230dedff6cbb66d3d69fb5b424267b13db77a (diff)
downloadpuzzles-6dcbacc2582e5aabae768e6df496525f67eed8a6.zip
puzzles-6dcbacc2582e5aabae768e6df496525f67eed8a6.tar.gz
puzzles-6dcbacc2582e5aabae768e6df496525f67eed8a6.tar.bz2
puzzles-6dcbacc2582e5aabae768e6df496525f67eed8a6.tar.xz
Patch from James Harvey in response to the new Rectangles grid
generator: (a) take out the `#ifdef SLOW_SYSTEM' because the new generator is much more efficient, and (b) convert another int to size_t to prevent the solver going negative in 16-bit ints as a result. [originally from svn r5983]
Diffstat (limited to 'rect.c')
-rw-r--r--rect.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/rect.c b/rect.c
index d04d17b..229ce18 100644
--- a/rect.c
+++ b/rect.c
@@ -101,10 +101,8 @@ static int game_fetch_preset(int i, char **name, game_params **params)
case 2: w = 11, h = 11; break;
case 3: w = 13, h = 13; break;
case 4: w = 15, h = 15; break;
-#ifndef SLOW_SYSTEM
case 5: w = 17, h = 17; break;
case 6: w = 19, h = 19; break;
-#endif
default: return FALSE;
}
@@ -749,7 +747,7 @@ static int rect_solver(int w, int h, int nrects, struct numberdata *numbers,
int placement;
int number;
} *rpns = NULL;
- int nrpns = 0, rpnsize = 0;
+ size_t nrpns = 0, rpnsize = 0;
int j;
for (i = 0; i < nrects; i++) {