From c17a8bfbd06d1a5f351db6a8a3efb439daa5b795 Mon Sep 17 00:00:00 2001 From: Tenari Date: Mon, 13 Apr 2026 07:48:18 -0500 Subject: [PATCH] we need the null terminator to be present by default --- string_chunk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/string_chunk.c b/string_chunk.c index dae1a08..7ebd38c 100644 --- a/string_chunk.c +++ b/string_chunk.c @@ -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++) {