summaryrefslogtreecommitdiffstats
path: root/source/slang/check.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/check.cpp')
-rw-r--r--source/slang/check.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/slang/check.cpp b/source/slang/check.cpp
index 37005a21d..199e733ce 100644
--- a/source/slang/check.cpp
+++ b/source/slang/check.cpp
@@ -6603,11 +6603,15 @@ namespace Slang
candidate.subst = genSubst;
auto& checkedArgs = genSubst->args;
- int aa = 0;
+ uint32_t aa = 0;
for (auto memberRef : getMembers(genericDeclRef))
{
if (auto typeParamRef = memberRef.as<GenericTypeParamDecl>())
{
+ if (aa >= context.argCount)
+ {
+ return false;
+ }
auto arg = context.getArg(aa++);
TypeExp typeExp;