Improve error message when a symbol's value is not constant

This commit is contained in:
ISSOtm
2020-01-21 00:25:47 +01:00
parent d466cab1e8
commit 155040240d

View File

@@ -139,7 +139,8 @@ void rpn_Symbol(struct Expression *expr, char *tzSym)
expr->isSymbol = true;
sym_Ref(tzSym);
makeUnknown(expr, "'%s' is not defined", tzSym);
makeUnknown(expr, "'%s' is not constant at assembly time",
tzSym);
expr->nRPNPatchSize += 5; /* 1-byte opcode + 4-byte symbol ID */
size_t nameLen = strlen(tzSym) + 1; /* Don't forget NUL! */