Permalink
Browse files

Fix crash on SPRK(ctype=0) being killed by PROT (#344)

  • Loading branch information...
LBPHacker authored and jacob1 committed Oct 7, 2016
1 parent ef9ef5b commit 4aa58d6c0c878ae18695184e1eef15c22466944c
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/simulation/elements/PROT.cpp
@@ -57,7 +57,7 @@ int Element_PROT::update(UPDATE_FUNC_ARGS)
{
//remove active sparks
int sparked = parts[under>>8].ctype;
if (sparked >= 0 && sparked < PT_NUM && sim->elements[sparked].Enabled)
if (sparked > 0 && sparked < PT_NUM && sim->elements[sparked].Enabled)
{
sim->part_change_type(under>>8, x, y, sparked);
parts[under>>8].life = 44 + parts[under>>8].life;

0 comments on commit 4aa58d6

Please sign in to comment.