diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2023-06-23 12:11:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-23 12:11:46 +0100 |
| commit | 9841b11a5423e2cba67c19fbd06e28732d36109c (patch) | |
| tree | 7c067cbc1501c4a044a80944ca282dd7da974074 /src/array.cpp | |
| parent | 5a6d5374d780e726be82f3576b4f647d9096d012 (diff) | |
| parent | c48057081e451c81524c7727ec3ccf434a45726f (diff) | |
Merge pull request #2597 from odin-lang/ordered-named-arguments
Allowing for Positional and Named Arguments in Procedure Calls
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; } |