diff --git a/utils.c b/utils.c index c162024..99135cb 100644 --- a/utils.c +++ b/utils.c @@ -11,10 +11,10 @@ #include "dunst.h" char *string_replace_char(char needle, char replacement, char *haystack) { - char *current = haystack; - while ((current = strchr (current, needle)) != NULL) - *current++ = replacement; - return haystack; + char *current = haystack; + while ((current = strchr (current, needle)) != NULL) + *current++ = replacement; + return haystack; } char *string_replace_at(char *buf, int pos, int len, const char *repl)