we need the null terminator to be present by default

This commit is contained in:
Tenari
2026-04-13 07:48:18 -05:00
parent 28180886ae
commit c17a8bfbd0
+1
View File
@@ -45,6 +45,7 @@ fn String stringChunkToString(Arena* a, StringChunkList list) {
.capacity = list.total_size + 1,
.bytes = arenaAllocArray(a, u8, list.total_size+1),
};
MemoryZero(result.bytes, result.capacity);
// copy the string bytes out of the StringChunkList into the correctly-sized String
StringChunk* chunk = list.first;
for (u32 i = 0; i < list.total_size; i++) {