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]
This commit is contained in:
Simon Tatham
2013-04-01 09:38:04 +00:00
parent 76824e1692
commit bce3f1bd26

2
grid.c
View File

@ -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) if (sscanf(desc, "G%d,%d,%d", &xoff, &yoff, &aoff) != 3)
assert(!"Invalid grid description."); assert(!"Invalid grid description.");
} else { } else {
xoff = yoff = 0; xoff = yoff = aoff = 0;
} }
xsz = width * tilesize; xsz = width * tilesize;