summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-check-decl.cpp')
-rw-r--r--source/slang/slang-check-decl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp
index e3b05ec00..aa84a057f 100644
--- a/source/slang/slang-check-decl.cpp
+++ b/source/slang/slang-check-decl.cpp
@@ -10120,7 +10120,7 @@ void SemanticsVisitor::validateArraySizeForVariable(VarDeclBase* varDecl)
// TODO(tfoley): How to handle the case where bound isn't known?
auto elementCount = arrayType->getElementCount();
- if (GetMinBound(elementCount) <= 0)
+ if (GetMinBound(elementCount) < 0)
{
getSink()->diagnose(varDecl, Diagnostics::invalidArraySize);
return;