tweak
This commit is contained in:
+1
-2
@@ -48,9 +48,8 @@ fn String stringChunkToStringWithPadding(Arena* a, StringChunkList list, u32 ext
|
|||||||
String result = {
|
String result = {
|
||||||
.length = list.total_size,
|
.length = list.total_size,
|
||||||
.capacity = cap,
|
.capacity = cap,
|
||||||
.bytes = arenaAllocArray(a, u8, cap),
|
.bytes = arenaAllocZero(a, cap),
|
||||||
};
|
};
|
||||||
MemoryZero(result.bytes, result.capacity);
|
|
||||||
// copy the string bytes out of the StringChunkList into the correctly-sized String
|
// copy the string bytes out of the StringChunkList into the correctly-sized String
|
||||||
StringChunk* chunk = list.first;
|
StringChunk* chunk = list.first;
|
||||||
for (u32 i = 0; i < list.total_size; i++) {
|
for (u32 i = 0; i < list.total_size; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user