Skip to content

Commit

Permalink
fix crash when creating a fighter with an explicit particle ID
Browse files Browse the repository at this point in the history
  • Loading branch information
mniip committed May 14, 2014
1 parent 20a7d05 commit 2153282
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/simulation/Simulation.cpp
Expand Up @@ -2804,7 +2804,7 @@ int Simulation::create_part(int p, int x, int y, int tv)
}
else if (parts[p].type == PT_FIGH)
{
fighters[(unsigned char)parts[i].tmp].spwn = 0;
fighters[(unsigned char)parts[p].tmp].spwn = 0;
fighcount--;
}
else if (parts[p].type == PT_SOAP)
Expand Down

1 comment on commit 2153282

@mniip
Copy link
Member Author

@mniip mniip commented on 2153282 May 14, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Errr. Actually the crash happens when in process of creating a particle with an explicit ID, a fighter is overwritten.

Please sign in to comment.