From 661427202718d647b8e8bb52ecb0114a30a71ce0 Mon Sep 17 00:00:00 2001 From: RavePossum Date: Sun, 10 Nov 2024 13:00:20 -0500 Subject: [PATCH] Update KBEC size to account for 4-byte aligment --- gfx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gfx.c b/gfx.c index 98ba290..ffbece9 100644 --- a/gfx.c +++ b/gfx.c @@ -1112,6 +1112,9 @@ void WriteNtrCell(char *path, struct JsonToCellOptions *options) kbecSize += options->cells[idx / iterNum]->oamCount * 0x06; } + // KBEC size is padded to be 4-byte aligned + kbecSize += kbecSize % 4; + unsigned int totalSize = (options->labelEnabled > 0 ? 0x34 : 0x20) + kbecSize; if (options->labelEnabled)