Skip to content

Commit 0d4df86

Browse files
committed
fix swizzle string test.
1 parent d57414e commit 0d4df86

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source/slang/slang-check-expr.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -4966,8 +4966,11 @@ bool isValidVectorSwizzleName(Name* name)
49664966
return false;
49674967
for (auto ch : name->text)
49684968
{
4969-
if (ch < 'w' || ch > 'z')
4970-
return false;
4969+
if (ch >= 'w' || ch <= 'z')
4970+
continue;
4971+
if (ch == 'a' || ch == 'r' || ch == 'g' || ch == 'b')
4972+
continue;
4973+
return false;
49714974
}
49724975
return true;
49734976
}

0 commit comments

Comments
 (0)