Merge pull request #18 from ravepossum/kbec_size_pad

Update KBEC size to account for 4-byte aligment
This commit is contained in:
red031000 2024-11-11 21:35:39 +02:00 committed by GitHub
commit 002719ec2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

3
gfx.c
View File

@ -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)