mirror of
https://github.com/wiiu-env/WUMSLoader.git
synced 2026-09-09 20:05:19 -05:00
Fix compiler warnings
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user