summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-04-02 13:07:23 (GMT)
committer Simon <simon@hardwired.org.uk>2011-04-04 15:11:05 (GMT)
commitbff7d73a642e086f3abcac0ec55d798154150b7e (patch)
treebe4601be40f923ef0b499dbb703c8df949a44fc0 /src
parent68f9b59f083f7bb3bf49d79655b54cad9d7d9fe4 (diff)
downloadpowder-bff7d73a642e086f3abcac0ec55d798154150b7e.zip
powder-bff7d73a642e086f3abcac0ec55d798154150b7e.tar.gz
Fix crashes when pasting on top of walls
Diffstat (limited to 'src')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index c34e330..1b708e9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -654,7 +654,7 @@ int parse_save(void *save, int size, int replace, int x0, int y0, unsigned char
gol[x][y]=0;
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;
memset(parts+k, 0, sizeof(particle));