1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Return string by copy to fix cases when string is constructed on stack

This commit is contained in:
Ivan Savenko
2023-01-01 20:54:05 +02:00
parent 33a9aa8ee5
commit 7c0d5666a0
11 changed files with 16 additions and 16 deletions

View File

@ -58,7 +58,7 @@ static void showInfoDialog(const CGHeroInstance* h, const ui32 txtID, const ui16
showInfoDialog(playerID,txtID,soundID);
}
static const std::string & visitedTxt(const bool visited)
static std::string visitedTxt(const bool visited)
{
int id = visited ? 352 : 353;
return VLC->generaltexth->allTexts[id];