shithub: puzzles

Download patch

ref: bce3f1bd2680b0f6bd6f6781b551c7c6b1e51f65
parent: 76824e16925df7d4aceae5f382bf53ddc55b94a0
author: Simon Tatham <anakin@pobox.com>
date: Mon Apr 1 05:38:04 EDT 2013

Greg Hewgill points out a code path on which the angle parameter to
the Penrose grid generation function can fail to be initialised.

[originally from svn r9798]

--- a/grid.c
+++ b/grid.c
@@ -2635,7 +2635,7 @@
         if (sscanf(desc, "G%d,%d,%d", &xoff, &yoff, &aoff) != 3)
             assert(!"Invalid grid description.");
     } else {
-        xoff = yoff = 0;
+        xoff = yoff = aoff = 0;
     }
 
     xsz = width * tilesize;