diff --git a/xa/src/xal.c b/xa/src/xal.c index 1781112..8ae4bad 100644 --- a/xa/src/xal.c +++ b/xa/src/xal.c @@ -653,7 +653,7 @@ int ll_search(char *s, int *n, xalabel_t cll_fl) /* search Label in Tab { for (k=0;(kn[k]==s[k]);k++); - if (cll_fl == CHEAP) { + if ( (j == k) && cll_fl == CHEAP) { if (ltp->blk == cll_getcur()) { er=E_OK; break; diff --git a/xa/tests/cll/Makefile b/xa/tests/cll/Makefile new file mode 100644 index 0000000..a3aee25 --- /dev/null +++ b/xa/tests/cll/Makefile @@ -0,0 +1,8 @@ + +XA=../../xa + +all: test1 + +%: %.a65 + ${XA} -XCA65 -o $@ $< + diff --git a/xa/tests/cll/test1.a65 b/xa/tests/cll/test1.a65 new file mode 100644 index 0000000..10ff933 --- /dev/null +++ b/xa/tests/cll/test1.a65 @@ -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) +