summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-04-01 11:31:23 (GMT)
committer Simon <simon@hardwired.org.uk>2011-04-04 15:10:41 (GMT)
commite18480006e648f43cc089735bf6d1e59c38f09a6 (patch)
treee603423e9026989b0a9b213441980449a2945e14 /src
parent0232fc930114d137f2ace18e3b9e23217815eda9 (diff)
downloadpowder-e18480006e648f43cc089735bf6d1e59c38f09a6.zip
powder-e18480006e648f43cc089735bf6d1e59c38f09a6.tar.gz
Clear particle data in parse_save
Fixes QRTZ sometimes growing when copied and pasted
Diffstat (limited to 'src')
-rw-r--r--src/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 1ef3f1e..960f093 100644
--- a/src/main.c
+++ b/src/main.c
@@ -657,6 +657,7 @@ int parse_save(void *save, int size, int replace, int x0, int y0, unsigned char
if (pmap[y][x])
{
k = pmap[y][x]>>8;
+ memset(parts+k, 0, sizeof(particle));
parts[k].type = j;
if (j == PT_PHOT)
parts[k].ctype = 0x3fffffff;
@@ -666,6 +667,7 @@ int parse_save(void *save, int size, int replace, int x0, int y0, unsigned char
}
else if (i < nf)
{
+ memset(parts+fp[i], 0, sizeof(particle));
parts[fp[i]].type = j;
if (j == PT_COAL)
parts[fp[i]].tmp = 50;