summaryrefslogtreecommitdiff
path: root/src/powder.c
diff options
context:
space:
mode:
authorCracker64 <cracker642@gmail.com>2011-02-01 03:53:32 (GMT)
committer Cracker64 <cracker642@gmail.com>2011-02-01 03:53:32 (GMT)
commitfea297b2ac430a6e4d32a9842d8904a04989d495 (patch)
treef7ac16c065d8ea9d7f36b937af0d80ae32d4c98c /src/powder.c
parentc1ca8bae2980fba045fbd881a18a9e75c14361aa (diff)
downloadpowder-fea297b2ac430a6e4d32a9842d8904a04989d495.zip
powder-fea297b2ac430a6e4d32a9842d8904a04989d495.tar.gz
Update with simon, and drawing SPRK on walls crash fix.
Diffstat (limited to 'src/powder.c')
-rw-r--r--src/powder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/powder.c b/src/powder.c
index b2932d1..6cafdb6 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -577,7 +577,7 @@ inline int create_part(int p, int x, int y, int t)
if (t==PT_SPRK)
{
- if (!((pmap[y][x]&0xFF)==PT_INST||(ptypes[pmap[y][x]&0xFF].properties&PROP_CONDUCTS)))
+ if ((pmap[y][x]>>8)>=NPART || !((pmap[y][x]&0xFF)==PT_INST||(ptypes[pmap[y][x]&0xFF].properties&PROP_CONDUCTS)))
return -1;
if (parts[pmap[y][x]>>8].life!=0)
return -1;