wpArrayClear memsets members to 0
Release / release (push) Successful in 3s

This commit is contained in:
2026-09-13 21:14:11 +01:00
parent 6fdda743fb
commit 9226891bb9
3 changed files with 7 additions and 5 deletions
+1
View File
@@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Switched to using `wpMiscUtilsRotl64` in `xorshift` - Switched to using `wpMiscUtilsRotl64` in `xorshift`
- Remove all uses of names starting with underscore - Remove all uses of names starting with underscore
- Ensure `wpArrayClear` memsets members to 0
## [2.4.0] - 2026-08-30 ## [2.4.0] - 2026-08-30
+1
View File
@@ -214,6 +214,7 @@ void arrayClear(WpArray array, u64 item_size) {
WpArrayHeader *header = arrayHeader(array); WpArrayHeader *header = arrayHeader(array);
header->count = 0; header->count = 0;
memset(array, 0, header->capacity * header->item_size);
} }
u64 arrayCalcAllocSize(u64 capacity, u64 item_size) { u64 arrayCalcAllocSize(u64 capacity, u64 item_size) {