aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2015-09-28 05:56:09 -0400
committerGene Cumm <gene.cumm@gmail.com>2015-09-28 05:56:31 -0400
commit779a4c85252de59b3134d39961c3f63c99d0ea2e (patch)
tree551f03aebbfca19ed583bc85cd940324822f3c89
parent4f2f680ab3793052d9eac49f1b60e90185619601 (diff)
downloadsyslinux-779a4c85252de59b3134d39961c3f63c99d0ea2e.tar.gz
syslinux-779a4c85252de59b3134d39961c3f63c99d0ea2e.tar.xz
syslinux-779a4c85252de59b3134d39961c3f63c99d0ea2e.zip
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 <josh@joshtriplett.org>
-rw-r--r--com32/lib/chrreplace.c2
1 files changed, 1 insertions, 1 deletions
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++;
}
}