mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Do not perform any sanity checks for bad section types
Otherwise, the arrays get overflowed
This commit is contained in:
@@ -220,8 +220,11 @@ static void doSanityChecks(struct Section *section, void *ptr)
|
|||||||
|
|
||||||
/* Sanity check the section's type */
|
/* Sanity check the section's type */
|
||||||
|
|
||||||
if (section->type < 0 || section->type >= SECTTYPE_INVALID)
|
if (section->type < 0 || section->type >= SECTTYPE_INVALID) {
|
||||||
fail("Section \"%s\" has an invalid type.", section->name);
|
fail("Section \"%s\" has an invalid type.", section->name);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (is32kMode && section->type == SECTTYPE_ROMX) {
|
if (is32kMode && section->type == SECTTYPE_ROMX) {
|
||||||
if (section->isBankFixed && section->bank != 1)
|
if (section->isBankFixed && section->bank != 1)
|
||||||
fail("%s: ROMX sections must be in bank 1 (if any) with option -t",
|
fail("%s: ROMX sections must be in bank 1 (if any) with option -t",
|
||||||
|
|||||||
Reference in New Issue
Block a user