Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 4aa58d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/simulation/elements/PROT.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 4aa58d6

Please sign in to comment.