mirror of
https://github.com/open-simh/simtools.git
synced 2026-01-26 04:01:44 +00:00
Handle invalid expressions in .WORD directives with a message.
This is most relevant in implied .WORD directives which are caused by an attempt to call a macro (which happens to be undefined) with arguments that don't parse as valid expressions.
This commit is contained in:
@@ -653,9 +653,14 @@ int do_word(
|
||||
} else {
|
||||
EX_TREE *value = parse_expr(cp, 0);
|
||||
|
||||
store_value(stack, tr, size, value);
|
||||
if (value->cp > cp) {
|
||||
store_value(stack, tr, size, value);
|
||||
|
||||
cp = value->cp;
|
||||
cp = value->cp;
|
||||
} else {
|
||||
report(stack->top, "Invalid expression in .WORD\n");
|
||||
cp = ""; /* force loop to end */
|
||||
}
|
||||
|
||||
free_tree(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user