mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-21 07:13:13 +01:00
Fix hasUnalignedFields(): take static arrays into account too.
This commit is contained in:
@@ -1571,7 +1571,10 @@ bool needsTemplateLinkage(Dsymbol* s)
|
||||
bool hasUnalignedFields(Type* t)
|
||||
{
|
||||
t = t->toBasetype();
|
||||
if (t->ty != Tstruct)
|
||||
if (t->ty == Tsarray) {
|
||||
assert(t->next->size() % t->next->alignsize() == 0);
|
||||
return hasUnalignedFields(t->next);
|
||||
} else if (t->ty != Tstruct)
|
||||
return false;
|
||||
|
||||
TypeStruct* ts = (TypeStruct*)t;
|
||||
|
||||
Reference in New Issue
Block a user