forked from github/server
fix a crash in battles caused by quicklist changes
This commit is contained in:
parent
42eb0ef0ed
commit
2af300431d
1 changed files with 3 additions and 1 deletions
|
@ -2301,8 +2301,10 @@ add_tactics(tactics * ta, fighter * fig, int value)
|
||||||
{
|
{
|
||||||
if (value == 0 || value < ta->value)
|
if (value == 0 || value < ta->value)
|
||||||
return;
|
return;
|
||||||
if (value > ta->value)
|
if (value > ta->value) {
|
||||||
ql_free(ta->fighters);
|
ql_free(ta->fighters);
|
||||||
|
ta->fighters = 0;
|
||||||
|
}
|
||||||
ql_push(&ta->fighters, fig);
|
ql_push(&ta->fighters, fig);
|
||||||
ql_push(&fig->side->battle->leaders, fig);
|
ql_push(&fig->side->battle->leaders, fig);
|
||||||
ta->value = value;
|
ta->value = value;
|
||||||
|
|
Loading…
Reference in a new issue