1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

- fixed crash with necromancy dialog #1009 (russian-only)

- Client::run will catch only asio exceptions
- (linux) fixed typo that disabled debug mode
This commit is contained in:
Ivan Savenko
2012-06-16 17:12:58 +00:00
parent 4d62525ff7
commit 1b50082e43
5 changed files with 9 additions and 8 deletions

View File

@ -245,20 +245,20 @@ DLL_LINKAGE void MetaString::toString(std::string &dst) const
dst += boost::lexical_cast<std::string>(numbers[nums++]);
break;
case TREPLACE_ESTRING:
dst.replace (dst.find("%s"), 2, exactStrings[exSt++]);
boost::replace_first(dst, "%s", exactStrings[exSt++]);
break;
case TREPLACE_LSTRING:
{
std::string hlp;
getLocalString(localStrings[loSt++], hlp);
dst.replace (dst.find("%s"), 2, hlp);
boost::replace_first(dst, "%s", hlp);
}
break;
case TREPLACE_NUMBER:
dst.replace (dst.find("%d"), 2, boost::lexical_cast<std::string>(numbers[nums++]));
boost::replace_first(dst, "%d", boost::lexical_cast<std::string>(numbers[nums++]));
break;
case TREPLACE_PLUSNUMBER:
dst.replace (dst.find("%+d"), 3, '+' + boost::lexical_cast<std::string>(numbers[nums++]));
boost::replace_first(dst, "%+d", '+' + boost::lexical_cast<std::string>(numbers[nums++]));
break;
default:
tlog1 << "MetaString processing error!\n";