aboutsummaryrefslogtreecommitdiff
path: root/src/array.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2023-06-23 12:11:46 +0100
committerGitHub <noreply@github.com>2023-06-23 12:11:46 +0100
commit9841b11a5423e2cba67c19fbd06e28732d36109c (patch)
tree7c067cbc1501c4a044a80944ca282dd7da974074 /src/array.cpp
parent5a6d5374d780e726be82f3576b4f647d9096d012 (diff)
parentc48057081e451c81524c7727ec3ccf434a45726f (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.cpp4
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;
}