summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-09-27 10:50:32 +0200
committerdefault <nobody@localhost>2022-09-27 10:50:32 +0200
commit25258ed379a16a72778ed45cca2a297483d002e6 (patch)
tree5fc68d416cd143620f41a9eba3dd83f2ee8b84ae
parent48a50770f46f160d8cbc852fdb90ea0c6c74cdd7 (diff)
Fixed bug in xs_replace_i().
-rw-r--r--xs.h2
1 files changed, 1 insertions, 1 deletions
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;