Skip to content

Commit

Permalink
Add comment: structures with different sizes are not compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
ptomin committed Dec 3, 2023
1 parent fdb97f3 commit faacfdf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Decompiler/Typing/ExpressionTypeDescender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ private TypeVariable ArrayField(
var dtElement = factory.CreateStructureType(null, elementSize);
if (
tvField.DataType is StructureType strField &&
strField.Size == 0)
// Structures with different sizes are not compatible
(strField.Size == 0 || strField.Size == elementSize))
{
foreach (var f in strField.Fields)
{
Expand Down

0 comments on commit faacfdf

Please sign in to comment.