Fix issues with line breaks in system font

This commit is contained in:
Henrik Rydgard committed 2013-08-30 17:44:44 +02:00
1 parent 00bc06e297
commit b505648c99
2 files changed
+17 -7

No files matched your search

+5 -2
View File
@@ -223,11 +223,14 @@ void SplitString(const std::string& str, const char delim, std::vector<std::stri
std::string ReplaceAll(std::string result, const std::string& src, const std::string& dest)
{
size_t pos = 0;
while(1)
{
const size_t pos = result.find(src);
if (pos == result.npos) break;
pos = result.find(src, pos);
if (pos == result.npos)
break;
result.replace(pos, src.size(), dest);
pos += dest.size();
}
return result;
}