Cast header pointer after incrementing
This commit is contained in:
@@ -217,7 +217,7 @@ u8 *_array_alloc_capacity(const Allocator *allocator, u64 capacity, u64 item_siz
|
|||||||
goto RETURN_ARRAY_ALLOC;
|
goto RETURN_ARRAY_ALLOC;
|
||||||
}
|
}
|
||||||
|
|
||||||
output = ((u8 *)header) + sizeof(ArrayHeader);
|
output = (u8 *)(header + 1);
|
||||||
header->magic = WAPP_ARRAY_MAGIC;
|
header->magic = WAPP_ARRAY_MAGIC;
|
||||||
header->count = 0;
|
header->count = 0;
|
||||||
header->capacity = capacity;
|
header->capacity = capacity;
|
||||||
|
|||||||
Reference in New Issue
Block a user