Fix issue #2044. While doing so, cleanup copy&pasted code.

This commit is contained in:
Kugel Fuhr
2024-09-01 10:29:59 +02:00
parent b688cfa0c0
commit 35c3fe5d0a
2 changed files with 47 additions and 55 deletions

View File

@@ -889,6 +889,7 @@ static void ParseO65 (void)
CfgOptionalAssign ();
/* Check which attribute was given */
CfgSymbol* Sym;
switch (AttrTok) {
case CFGTOK_EXPORT:
@@ -896,8 +897,11 @@ static void ParseO65 (void)
AttrFlags |= atExport;
/* We expect an identifier */
CfgAssureIdent ();
/* Remember it as an export for later */
NewCfgSymbol (CfgSymO65Export, GetStrBufId (&CfgSVal));
/* Remember it as an export for later. We do not support o65
* output for the 65816, so the address size is always 16 bit.
*/
Sym = NewCfgSymbol (CfgSymO65Export, GetStrBufId (&CfgSVal));
Sym->AddrSize = ADDR_SIZE_ABS;
/* Eat the identifier token */
CfgNextTok ();
break;
@@ -907,8 +911,11 @@ static void ParseO65 (void)
AttrFlags |= atImport;
/* We expect an identifier */
CfgAssureIdent ();
/* Remember it as an import for later */
NewCfgSymbol (CfgSymO65Import, GetStrBufId (&CfgSVal));
/* Remember it as an import for later. We do not support o65
* output for the 65816, so the address size is always 16 bit.
*/
Sym = NewCfgSymbol (CfgSymO65Import, GetStrBufId (&CfgSVal));
Sym->AddrSize = ADDR_SIZE_ABS;
/* Eat the identifier token */
CfgNextTok ();
break;