1
0
mirror of https://github.com/fachat/xa65.git synced 2024-06-17 04:29:48 +00:00

fix label compare bug in cheap local labels

This commit is contained in:
Andre Fachat 2023-11-24 15:24:53 +01:00
parent e95549dfd1
commit c4c4922885
3 changed files with 39 additions and 1 deletions

View File

@ -653,7 +653,7 @@ int ll_search(char *s, int *n, xalabel_t cll_fl) /* search Label in Tab
{
for (k=0;(k<j)&&(ltp->n[k]==s[k]);k++);
if (cll_fl == CHEAP) {
if ( (j == k) && cll_fl == CHEAP) {
if (ltp->blk == cll_getcur()) {
er=E_OK;
break;

8
xa/tests/cll/Makefile Normal file
View File

@ -0,0 +1,8 @@
XA=../../xa
all: test1
%: %.a65
${XA} -XCA65 -o $@ $<

30
xa/tests/cll/test1.a65 Normal file
View File

@ -0,0 +1,30 @@
; As extracted from https://codebase64.org/doku.php?id=base:256_bytes_tune_player
.org $326
foo:
@musicdata:
; errs
@Voc0start:
.byte $00
; .byte <(@Voc0komp-@musicdata)
; errs
@Voc1start:
.byte $40
.byte <(@Voc1melody-@musicdata)
; errs
@Voc2start:
;-
;-
.byte $50
@Voc2loop:
.byte $60
.byte <(@Voc2loop-@musicdata)
; errs
@Voc0komp:
.byte $10
.byte <(@Voc0start-@musicdata)
@Voc1melody:
.byte $20
.byte <(@Voc1start-@musicdata)