From 7497aa73e5590a438d17eb4642e4aaba4fe66863 Mon Sep 17 00:00:00 2001 From: pommicket Date: Sat, 26 Aug 2023 00:05:13 -0400 Subject: fix bad write in ds.h --- README.md | 1 + ds.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2267ba7..0ecd0c1 100644 --- a/README.md +++ b/README.md @@ -323,6 +323,7 @@ Then, open windows\_installer\\ted\\ted.sln, and build. 2.4.2 Fix font absolute paths 2023 Jul 21 2.4.3 Some font related fixes 2023 Aug 1 2.5 Rename symbol, document links, bug fixes 2023 Aug 15 +2.5.1 Bug fixes 2023 Aug 26 ## License diff --git a/ds.h b/ds.h index 757c6f9..a5033f7 100644 --- a/ds.h +++ b/ds.h @@ -247,7 +247,7 @@ static void *arr_insert_multiple_(void *arr, size_t member_size, size_t index, s ArrHeader *hdr = arr_hdr_(arr); memmove((char *)arr + (index + count) * member_size, (char *)arr + index * member_size, - arr_len(arr) * member_size); + (arr_len(arr) - index) * member_size); memset((char *)arr + index * member_size, 0, count * member_size); hdr->len += (u32)count; return arr; -- cgit v1.2.3