1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-08 15:29:37 +00:00

Fixed an error message printer.

The disassembler can be built and won't crash if it sees duplicate labels, and one of them is an unnamed label.
This commit is contained in:
Greg King 2020-03-11 17:28:42 -04:00
parent b91ad02da1
commit 2fc24847ac

View File

@ -97,7 +97,9 @@ static void AddLabel (unsigned Addr, attr_t Attr, const char* Name)
strcmp (SymTab[Addr], Name) == 0))) {
return;
}
Error ("Duplicate label for address $%04X: %s/%s", Addr, SymTab[Addr], Name);
Error ("Duplicate label for address $%04X (%s): '%s'", Addr,
SymTab[Addr] == 0 ? "<unnamed label>" : SymTab[Addr],
Name == 0 ? "<unnamed label>" : Name);
}
/* Create a new label (xstrdup will return NULL if input NULL) */