[syslinux:master] chrreplace: Don't skip the first character
syslinux-bot for Josh Triplett
josh at joshtriplett.org
Mon Sep 28 03:00:04 PDT 2015
Commit-ID: 779a4c85252de59b3134d39961c3f63c99d0ea2e
Gitweb: http://www.syslinux.org/commit/779a4c85252de59b3134d39961c3f63c99d0ea2e
Author: Josh Triplett <josh at joshtriplett.org>
AuthorDate: Mon, 28 Sep 2015 05:56:09 -0400
Committer: Gene Cumm <gene.cumm at gmail.com>
CommitDate: Mon, 28 Sep 2015 05:56:31 -0400
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 at joshtriplett.org>
---
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 65786f9..cfbf5d4 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++;
}
}
More information about the Syslinux-commits
mailing list