From 779a4c85252de59b3134d39961c3f63c99d0ea2e Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Mon, 28 Sep 2015 05:56:09 -0400 Subject: chrreplace: Don't skip the first character Check if the first character matches the character to replace, rather than skipping it and starting with the second. Signed-off-by: Josh Triplett --- com32/lib/chrreplace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com32/lib/chrreplace.c b/com32/lib/chrreplace.c index 65786f94..cfbf5d4c 100644 --- a/com32/lib/chrreplace.c +++ b/com32/lib/chrreplace.c @@ -4,8 +4,8 @@ void chrreplace(char *source, char old, char new) { while (*source) { - source++; if (source[0] == old) source[0]=new; + source++; } } -- cgit v1.2.1