validate: check constant composite type

This commit is contained in:
Dzmitry Malyshau committed 2022-01-14 12:44:27 -05:00
1 parent bf0cb2b3a9
commit 003ea29a3a
1 file changed
+1 -1
+1 -1
View File
@@ -240,7 +240,7 @@ impl Validator {
}
}
crate::ConstantInner::Composite { ty, ref components } => {
match types[ty].inner {
match types.get_handle(ty).ok_or(ConstantError::InvalidType)?.inner {
crate::TypeInner::Array {
size: crate::ArraySize::Constant(size_handle),
..