Verified Commit ee4bf4e7 authored by Camil Staps's avatar Camil Staps 🚀

Fix linker after 81f446dc

parent 40bf8145
Pipeline #43768 failed with stages
in 9 minutes and 35 seconds
......@@ -621,7 +621,7 @@ int parse_program(struct parser *state, struct char_provider *cp) {
strcpy(label->label_name,state->program->symbol_table[state->ptr].name);
label->label_id=-1;
label->label_offset=state->program->symbol_table[state->ptr].offset;
label->label_module_n=-2;
label->label_module_n=0;
struct label_node *node=safe_malloc(sizeof(struct label_node));
node->label_node_left=NULL;
......@@ -629,11 +629,11 @@ int parse_program(struct parser *state, struct char_provider *cp) {
node->label_node_label_p=label;
state->new_label_nodes[state->n_labels++]=node;
} else {
if (state->program->symbol_table[state->ptr].offset!=-1)
label->label_offset=state->program->symbol_table[state->ptr].offset;
make_label_global(label);
} else if (state->program->symbol_table[state->ptr].offset!=-1){
label->label_offset=state->program->symbol_table[state->ptr].offset;
}
make_label_global(label);
}
#endif
if (++state->ptr >= state->program->symbol_table_size)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment