Skip to content

Commit

Permalink
Merge branch 'asar_19' into asar_2_beta
Browse files Browse the repository at this point in the history
  • Loading branch information
randomdude999 committed Jan 28, 2024
2 parents 7e09e5d + 68ef1e1 commit e8bddfe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/asar/assembleblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,12 @@ void assembleblock(const char * block, int& single_line_for_tracker)
realstartpos = 0;
snespos_valid = true;

setlabel(ns + struct_name, snespos, static_struct);
if(in_sub_struct) {
string labelname = struct_parent + "." + struct_name;
setlabel(ns + labelname, snespos, static_struct);
} else {
setlabel(ns + struct_name, snespos, static_struct);
}

#undef ret_error_cleanup
#undef ret_error_params_cleanup
Expand Down
5 changes: 5 additions & 0 deletions tests/structs.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
;`02 40
;`00 40
;`10 40
;`04 40

struct struct_without_org $4000
.first: skip 2
Expand All @@ -23,6 +24,9 @@ struct test3 extends test
.lol: skip 5
endstruct

struct test2 extends struct_without_org
endstruct

lda test[1].size
;lda test.size
lda test.test2.lol
Expand Down Expand Up @@ -70,3 +74,4 @@ db objectsize(test.test3)
dw struct_without_org.second
dw struct_without_org
dw struct_without_org[4]
dw struct_without_org.test2

0 comments on commit e8bddfe

Please sign in to comment.