diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2017-03-19 13:02:54 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2017-03-19 13:02:54 (GMT) |
commit | 94fd405bb0c2e6dfa43324b04a336ffb611c58ce (patch) | |
tree | f3170587b4006fa358665a6bbfa301731503d3b3 /src/common/extstr.c | |
parent | 499f00977cd7f50ce0c4cf24dd59b1e920e5b180 (diff) |
Provided initial features for debugging using GDB.
Diffstat (limited to 'src/common/extstr.c')
-rw-r--r-- | src/common/extstr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/extstr.c b/src/common/extstr.c index 087505a..bd561ba 100644 --- a/src/common/extstr.c +++ b/src/common/extstr.c @@ -196,13 +196,13 @@ char *strrpl(char *haystack, const char *needle1, const char *needle2) haystack = (char *)realloc(haystack, inlen * sizeof(char *)); found = haystack + index; - memmove(found + len2, found + len1, inlen + len2 - index); + memmove(found + len2, found + len1, inlen - len2 - index); } else if (len2 < len1) { - memmove(found + len2, found + len1, inlen + len2 - index); + memmove(found + len2, found + len1, inlen - index - len1); inlen -= (len1 - len2); |