1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-29 00:41:38 +02:00
* 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:
Michał W. Urbańczyk
2011-05-28 01:02:28 +00:00
parent 4af4f0a707
commit 3ca95ef5ed
11 changed files with 82 additions and 38 deletions

View File

@ -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];
}
}