shithub: puzzles

Download patch

ref: 6dcbacc2582e5aabae768e6df496525f67eed8a6
parent: c98230dedff6cbb66d3d69fb5b424267b13db77a
author: Simon Tatham <anakin@pobox.com>
date: Tue Jun 21 04:15:53 EDT 2005

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]

--- a/rect.c
+++ b/rect.c
@@ -101,10 +101,8 @@
       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 @@
                 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++) {