diff options
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/util/util_str.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/lib/util/util_str.c b/source4/lib/util/util_str.c index 34d37ecfbd..df9fd44cd6 100644 --- a/source4/lib/util/util_str.c +++ b/source4/lib/util/util_str.c @@ -775,8 +775,7 @@ _PUBLIC_ int strwicmp(const char *psz1, const char *psz2) **/ _PUBLIC_ void string_replace(char *s, char oldc, char newc) { - while (*s) { - s++; + for (;s && *s; s++) { if (*s == oldc) *s = newc; } } |