summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 87778bb..3a9776e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1526,8 +1526,13 @@ int main(int argc, char *argv[])
for (i=0; i<NPART; i++)
if (parts[i].type==PT_SPRK)
{
- parts[i].type = parts[i].ctype;
- parts[i].life = 0;
+ if (parts[i].ctype >= 0 && parts[i].ctype < PT_NUM)
+ {
+ parts[i].type = parts[i].ctype;
+ parts[i].life = 0;
+ }
+ else
+ kill_part(i);
}
}
else