forked from github/server
suppress valgrind warning form issue #227
This commit is contained in:
parent
32bd8c4353
commit
e6b3a6da65
|
@ -901,7 +901,9 @@ static void rmtroop(troop dt)
|
||||||
rmfighter(df, 1);
|
rmfighter(df, 1);
|
||||||
|
|
||||||
assert(dt.index >= 0 && dt.index < df->unit->number);
|
assert(dt.index >= 0 && dt.index < df->unit->number);
|
||||||
df->person[dt.index] = df->person[df->alive - df->removed];
|
if (dt.index!=df->alive-df->removed) {
|
||||||
|
df->person[dt.index] = df->person[df->alive - df->removed];
|
||||||
|
}
|
||||||
if (df->removed) {
|
if (df->removed) {
|
||||||
df->person[df->alive - df->removed] = df->person[df->alive];
|
df->person[df->alive - df->removed] = df->person[df->alive];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue