summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-01-10 13:55:03 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-01-10 13:55:03 (GMT)
commit585a2f345be7f58a6811f0eceda8c2b39e103deb (patch)
tree09f7cc7f776253ba949cc83e9488f59acb49f39f /src/common
parent239694d99ad81f1e435125e76a2a930213d06b21 (diff)
Fixed a bug when the replacing string contains the replaced pattern.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/extstr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/extstr.c b/src/common/extstr.c
index 59d4389..9986ec1 100644
--- a/src/common/extstr.c
+++ b/src/common/extstr.c
@@ -209,6 +209,8 @@ char *strrpl(char *haystack, const char *needle1, const char *needle2)
memcpy(found, needle2, len2);
+ index += len2;
+
}
return haystack;