Skip to content

Commit b92bf08

Browse files
committed
Fix array type descriptor comparison for arrays
***NO_CI***
1 parent fd2882e commit b92bf08

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/CLR/Core/CLR_RT_HeapBlock.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,10 @@ bool CLR_RT_HeapBlock::TypeDescriptorsMatch(
896896
case DATATYPE_SZARRAY:
897897
{
898898
// compare outer dims (always 1) then element types
899-
return TypeDescriptorsMatch(expectedType, actualType);
899+
CLR_RT_TypeDescriptor expectedElementType, actualElementType;
900+
expectedElementType.GetElementType(expectedElementType);
901+
actualElementType.GetElementType(actualElementType);
902+
return TypeDescriptorsMatch(expectedElementType, actualElementType);
900903
}
901904

902905
// primitives and other leaf types match on the DataType alone

0 commit comments

Comments
 (0)