From 25258ed379a16a72778ed45cca2a297483d002e6 Mon Sep 17 00:00:00 2001 From: default Date: Tue, 27 Sep 2022 10:50:32 +0200 Subject: [PATCH] Fixed bug in xs_replace_i(). --- xs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs.h b/xs.h index 48f7fe7..2bb0173 100644 --- a/xs.h +++ b/xs.h @@ -278,7 +278,7 @@ d_char *xs_replace_i(d_char *str, const char *sfrom, const char *sto) str = xs_expand(str, n_offset, stsz); memcpy(str + n_offset, sto, stsz); - offset = n_offset; + offset = n_offset + stsz; } return str;