mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Don't overwrite symbol when it's not allowed
When a user tried to overwrite a builtin symbol, it would change its type despite the error, making the second try succeed. This is problematic, as the location of a builtin symbol cannot be updated.
This commit is contained in:
@@ -426,6 +426,7 @@ struct Symbol *sym_AddSet(char const *symName, int32_t value)
|
||||
symName, sym->type == SYM_LABEL ? "label" : "constant");
|
||||
dumpFilename(sym);
|
||||
putc('\n', stderr);
|
||||
return sym;
|
||||
} else {
|
||||
/* TODO: can the scope be incorrect when taking over refs? */
|
||||
updateSymbolFilename(sym);
|
||||
|
||||
Reference in New Issue
Block a user