Fix crashes when pasting on top of walls

This commit is contained in:
jacksonmj 2011-04-02 14:07:23 +01:00 committed by Simon
parent 68f9b59f08
commit bff7d73a64

View File

@ -654,7 +654,7 @@ int parse_save(void *save, int size, int replace, int x0, int y0, unsigned char
gol[x][y]=0; gol[x][y]=0;
if (j)// && !(isplayer == 1 && j==PT_STKM)) if (j)// && !(isplayer == 1 && j==PT_STKM))
{ {
if (pmap[y][x]) if (pmap[y][x] && (pmap[y][x]>>8)<NPART)
{ {
k = pmap[y][x]>>8; k = pmap[y][x]>>8;
memset(parts+k, 0, sizeof(particle)); memset(parts+k, 0, sizeof(particle));