fix a crash in battles caused by quicklist changes

This commit is contained in:
Enno Rehling 2011-03-01 04:55:58 +01:00
parent 42eb0ef0ed
commit 2af300431d
1 changed files with 3 additions and 1 deletions

View File

@ -2301,8 +2301,10 @@ add_tactics(tactics * ta, fighter * fig, int value)
{
if (value == 0 || value < ta->value)
return;
if (value > ta->value)
if (value > ta->value) {
ql_free(ta->fighters);
ta->fighters = 0;
}
ql_push(&ta->fighters, fig);
ql_push(&fig->side->battle->leaders, fig);
ta->value = value;