diff --git a/src/machine.cpp b/src/machine.cpp index a8be17bd3a..72a7604c8e 100644 --- a/src/machine.cpp +++ b/src/machine.cpp @@ -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; }