From d925dc6e4101362a04e1e2a0bb2a0ae284ba85ec Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Tue, 12 Sep 2006 13:26:40 +0000 Subject: [PATCH] bugfix: correct string length computation in replace_all --- plugins/include/string.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/include/string.inc b/plugins/include/string.inc index 01ad9d52..44ded07c 100755 --- a/plugins/include/string.inc +++ b/plugins/include/string.inc @@ -234,7 +234,7 @@ stock replace_all(string[], len, what[], with[]) new total_len = strlen(string); new temp_pos = 0 - while (replace(string[pos], len, what, with) != 0) + while (replace(string[pos], len - pos, what, with) != 0) { /* jump to position after replacement */ pos += with_len;