1
0
mirror of https://github.com/ksherlock/x65.git synced 2024-06-11 16:29:31 +00:00

Fix user defined labels not keeping up with current address

- can skip multiple labels per instruction
This commit is contained in:
Carl-Henrik Skårstedt 2015-12-09 00:06:38 -08:00
parent 6c843c99fd
commit 8a37b0dc32
3 changed files with 7 additions and 3 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1094,9 +1094,13 @@ void GetReferences(unsigned char *mem, size_t bytes, bool acc_16, bool ind_16, i
while (bytes) {
if (curr_label<start_labels) {
if (addr>=refs[curr_label].address) {
curr_data = refs[curr_label].data != DT_CODE;
if (!refs[curr_label].size)
++curr_label;
while (curr_label<start_labels && addr>=refs[curr_label].address) {
curr_data = refs[curr_label].data != DT_CODE;
if (addr>=(refs[curr_label].address+refs[curr_label].size))
++curr_label;
else
break;
}
} else if (refs[curr_label].size && addr>(refs[curr_label].address + refs[curr_label].size)) {
curr_data = false;
curr_label++;