More defensive-coding fixes from James H.

[originally from svn r8605]
This commit is contained in:
Simon Tatham
2009-07-01 22:01:21 +00:00
parent 652f03a8ae
commit cfdba00313
4 changed files with 7 additions and 2 deletions

View File

@ -1045,6 +1045,7 @@ static game_drawstate *game_new_drawstate(drawing *dr, game_state *state)
ds->visible = snewn(ds->w * ds->h, unsigned char);
ds->tilesize = 0; /* not decided yet */
memset(ds->visible, 255, ds->w * ds->h);
ds->cur_x = ds->cur_y = 0;
return ds;
}