diff --git a/fbreader/fbreader/zlibrary/core/src/util/ZLStringUtil.cpp b/fbreader/fbreader/zlibrary/core/src/util/ZLStringUtil.cpp index cf62615..7978244 100644 --- a/fbreader/fbreader/zlibrary/core/src/util/ZLStringUtil.cpp +++ b/fbreader/fbreader/zlibrary/core/src/util/ZLStringUtil.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 2004-2010 Geometer Plus - * Copyright (C) 2015 Slava Monich + * Copyright (C) 2015-2019 Slava Monich * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -129,7 +129,7 @@ std::vector ZLStringUtil::splitString(const char *str, const char* void ZLStringUtil::replaceAll(std::string &str, const std::string &find, const std::string &replaceWith) { size_t pos = 0; - while ((pos == str.find(find, pos)) != std::string::npos) { + while ((pos = str.find(find, pos)) != std::string::npos) { str.replace(pos, find.length(), replaceWith); pos += replaceWith.length(); }