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) {
fieldOffset(t, field) = staticOffset++;
} else {
unsigned excess = memberOffset % BytesPerWord;
if (excess and fieldCode(t, field) == ObjectField) {
unsigned excess = memberOffset % fieldSize(t, field);
if (excess) {
memberOffset += BytesPerWord - excess;
}