mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-29 00:41:38 +02:00
Fixed #730:
* crash on +5 growth week * crash on spawning wandering creatures on double growth months (how come that has not been found in previous build?) More logging for #729-like issues.
This commit is contained in:
@ -271,8 +271,18 @@ void MetaString::getLocalString(const std::pair<ui8,ui32> &txt, std::string &dst
|
||||
case COLOR:
|
||||
vec = &VLC->generaltexth->capColors;
|
||||
break;
|
||||
default:
|
||||
tlog1 << "Failed string substitution because type is " << type << std::endl;
|
||||
dst = "#@#";
|
||||
return;
|
||||
}
|
||||
dst = (*vec)[ser];
|
||||
if(vec->size() <= ser)
|
||||
{
|
||||
tlog1 << "Failed string substitution with type " << type << " because index " << ser << " is out of bounds!\n";
|
||||
dst = "#!#";
|
||||
}
|
||||
else
|
||||
dst = (*vec)[ser];
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user