Fix compiler warnings

This commit is contained in:
Maschell
2020-06-07 14:17:02 +02:00
parent e84b6f63bf
commit 44b65558ef
4 changed files with 7 additions and 7 deletions

View File

@@ -259,12 +259,12 @@ char *StringTools::str_replace(char *orig, char *rep, char *with) {
if (len_rep == 0)
return NULL; // empty rep causes infinite loop during count
if (!with)
with = "";
with = (char *) "";
len_with = strlen(with);
// count the number of replacements needed
ins = orig;
for (count = 0; tmp = strstr(ins, rep); ++count) {
for (count = 0; (tmp = strstr(ins, rep)); ++count) {
ins = tmp + len_rep;
}