This commit is contained in:
aozhiwei 2023-03-31 17:33:57 +08:00
parent 1e23d6ecae
commit fdb78d8074
2 changed files with 2 additions and 2 deletions

View File

@ -1746,7 +1746,7 @@ void Creature::RemoveSurplusHero(int hero_id, int num)
++exists_num; ++exists_num;
} }
} }
while (exists_num > num) { while (exists_num > num && num > 0) {
Hero* hero = list_first_entry(&itr->second, Hero* hero = list_first_entry(&itr->second,
Hero, Hero,
entry); entry);

2
third_party/a8 vendored

@ -1 +1 @@
Subproject commit b6c896a7c5be517ba12d1b069d58103b6214f09f Subproject commit 369587606d3c5626e38b2515fe6be56c0df28476