Better Fix

This commit is contained in:
TheBrokenRail 2024-01-06 05:55:49 -05:00
parent cd82bb2c41
commit c21d34a166

View File

@ -190,8 +190,11 @@ export class Struct {
} else if (i === this.#properties.length) { } else if (i === this.#properties.length) {
// End Of Structure Padding // End Of Structure Padding
if (this.#size !== null && lastProperty) { if (this.#size !== null && lastProperty) {
const realSize = this.#roundSize(lastProperty.propertyOffset() + lastProperty.propertySize()); const realSize = lastProperty.propertyOffset() + lastProperty.propertySize();
neededPadding = this.#size - realSize; const realRoundedSize = this.#roundSize(realSize);
if (realRoundedSize !== this.#size) {
neededPadding = this.#size - realSize;
}
} }
} else { } else {
// Inner Structure Padding // Inner Structure Padding