mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 10:42:07 +00:00
Prevent creating labels outside of sections
This doesn't make sense, and causes RGBLINK to misbehave
This commit is contained in:
@@ -634,6 +634,10 @@ void sym_AddReloc(char *tzSym)
|
||||
|
||||
nsym->pScope = scope;
|
||||
nsym->pSection = pCurrentSection;
|
||||
/* Labels need to be assigned a section, except PC */
|
||||
if (!pCurrentSection && strcmp(tzSym, "@"))
|
||||
yyerror("Label \"%s\" created outside of a SECTION",
|
||||
tzSym);
|
||||
|
||||
updateSymbolFilename(nsym);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user