1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Don't load empty rumor strings

This commit is contained in:
Ivan Savenko
2022-12-28 01:14:19 +02:00
parent a499390b9c
commit 10541855d9
2 changed files with 44 additions and 32 deletions

View File

@@ -2175,9 +2175,7 @@ void CGameState::updateRumor()
case RumorState::TYPE_RAND:
auto vector = VLC->generaltexth->findStringsWithPrefix("core.randtvrn");
do
rumorId = rand.nextInt((int)vector.size() - 1);
while(vector[rumorId].empty());
rumorId = rand.nextInt((int)vector.size() - 1);
break;
}