1
0
mirror of https://github.com/ksherlock/x65.git synced 2024-06-09 03:29:28 +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 0e64a58375
commit a674f7f165

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++;