mirror of
https://git.vectorsigma.ru/public/mod-playerbots.git
synced 2026-08-05 16:39:09 +00:00
Last fixes on chat + database incorrect charset
This commit is contained in:
@@ -9,7 +9,8 @@ void PlayerbotTextMgr::replaceAll(std::string & str, const std::string & from, c
|
||||
if (from.empty())
|
||||
return;
|
||||
size_t start_pos = 0;
|
||||
while ((start_pos = str.find(from, start_pos)) != std::string::npos) {
|
||||
while ((start_pos = str.find(from, start_pos)) != std::string::npos)
|
||||
{
|
||||
str.replace(start_pos, from.length(), to);
|
||||
start_pos += to.length(); // In case 'to' contains 'from', like replacing 'x' with 'yx'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user