align fields naturally in parseFieldTable

This commit is contained in:
Joel Dice 2007-10-16 19:20:36 -06:00
parent f84b865f03
commit 29b5e81aed

View File

@ -758,8 +758,8 @@ parseFieldTable(Thread* t, Stream& s, object class_, object pool)
if (flags & ACC_STATIC) { if (flags & ACC_STATIC) {
fieldOffset(t, field) = staticOffset++; fieldOffset(t, field) = staticOffset++;
} else { } else {
unsigned excess = memberOffset % BytesPerWord; unsigned excess = memberOffset % fieldSize(t, field);
if (excess and fieldCode(t, field) == ObjectField) { if (excess) {
memberOffset += BytesPerWord - excess; memberOffset += BytesPerWord - excess;
} }