diff options
Diffstat (limited to 'Source/DOH/string.c')
-rw-r--r-- | Source/DOH/string.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/DOH/string.c b/Source/DOH/string.c index 3689f4ffe..093330b89 100644 --- a/Source/DOH/string.c +++ b/Source/DOH/string.c @@ -836,7 +836,9 @@ static int replace_simple(String *str, char *token, char *rep, int flags, int co memmove(t, s, (str->str + str->len) - s + 1); } } else { - t += (c - s); + if (c) { + t += (c - s); + } } s = c; ic--; |