chiark / gitweb /
Greg Hewgill points out a code path on which the angle parameter to
authorSimon Tatham <anakin@pobox.com>
Mon, 1 Apr 2013 09:38:04 +0000 (09:38 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 1 Apr 2013 09:38:04 +0000 (09:38 +0000)
the Penrose grid generation function can fail to be initialised.

[originally from svn r9798]

grid.c

diff --git a/grid.c b/grid.c
index 658fd4d4d01c2bd137fe69855dbb78df665f5bd4..cb62eb7d9a5f697ebae6565481699b5a043b4fef 100644 (file)
--- a/grid.c
+++ b/grid.c
@@ -2635,7 +2635,7 @@ static grid *grid_new_penrose(int width, int height, int which, char *desc)
         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;