Patch from James Harvey in response to the new Rectangles grid
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 21 Jun 2005 08:15:53 +0000 (08:15 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 21 Jun 2005 08:15:53 +0000 (08:15 +0000)
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.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@5983 cda61777-01e9-0310-a592-d414129be87e

rect.c

diff --git a/rect.c b/rect.c
index d04d17b..229ce18 100644 (file)
--- 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++) {