Skip to content

Commit

Permalink
chrreplace: Don't skip the first character
Browse files Browse the repository at this point in the history
Check if the first character matches the character to replace, rather
than skipping it and starting with the second.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
  • Loading branch information
joshtriplett authored and geneC committed Sep 28, 2015
1 parent 4f2f680 commit 779a4c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion com32/lib/chrreplace.c
Expand Up @@ -4,8 +4,8 @@
void chrreplace(char *source, char old, char new)
{
while (*source) {
source++;
if (source[0] == old) source[0]=new;
source++;
}
}

0 comments on commit 779a4c8

Please sign in to comment.