diff options
| author | gingerBill <bill@gingerbill.org> | 2023-06-19 22:12:47 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-06-19 22:12:47 +0100 |
| commit | 6568625dea679b4622024f62fc14725aa49b2106 (patch) | |
| tree | e7b06b3450671094640d73e1d233dd1654db359a /src/array.cpp | |
| parent | 427f212170114b006fcb6ff1366231f99acff13e (diff) | |
Fix line error printing for error messages
Diffstat (limited to 'src/array.cpp')
| -rw-r--r-- | src/array.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/array.cpp b/src/array.cpp index f1a1f93e2..d8e25d25d 100644 --- a/src/array.cpp +++ b/src/array.cpp @@ -80,7 +80,9 @@ gb_internal Slice<T> slice_make(gbAllocator const &allocator, isize count) { GB_ASSERT(count >= 0); Slice<T> s = {}; s.data = gb_alloc_array(allocator, T, count); - GB_ASSERT(s.data != nullptr); + if (count > 0) { + GB_ASSERT(s.data != nullptr); + } s.count = count; return s; } |