Skip to content

Commit cbf8b54

Browse files
author
Noam Preil
committed
Fix forward lookup of local labels in .dw
1 parent b4be9fa commit cbf8b54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assembler/directives.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,12 +514,12 @@ int handle_dw(struct assembler_state *state, char **argv, int argc) {
514514
ERROR_NO_ARG(ERROR_INVALID_SYNTAX, state->column);
515515
} else {
516516
result = evaluate_expression(expression, state->equates, &error, &symbol);
517+
transform_local_labels(expression, state->last_global_label);
517518

518519
if (error == EXPRESSION_BAD_SYMBOL) {
519520
if (scas_runtime.options.explicit_import) {
520521
int ignored_error;
521522
char *fixed_symbol;
522-
transform_local_labels(expression, state->last_global_label);
523523
evaluate_expression(expression, state->equates, &ignored_error, &fixed_symbol);
524524
unresolved_symbol_t *unresolved_sym = malloc(sizeof(unresolved_symbol_t));
525525
unresolved_sym->name = malloc(strlen(fixed_symbol) + 1);

0 commit comments

Comments
 (0)