From 68cf1da422479f8f22578286db7cdcf3f3d1c5b7 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sun, 3 Dec 2023 21:58:29 +0100 Subject: [PATCH] Added '@' check to islabelname --- src/ulas.c | 4 ++++ tests/t0.s | 1 + 2 files changed, 5 insertions(+) diff --git a/src/ulas.c b/src/ulas.c index 97d2539..5ca228f 100644 --- a/src/ulas.c +++ b/src/ulas.c @@ -208,6 +208,10 @@ int ulas_isname(const char *tok, unsigned long n) { } int ulas_islabelname(const char *tok, unsigned long n) { + if (tok[0] == '@' && n > 0) { + tok+=1; + n--; + } return tok[n - 1] == ':' && ulas_isname(tok, n - 1); } diff --git a/tests/t0.s b/tests/t0.s index cf5efec..4abdad7 100644 --- a/tests/t0.s +++ b/tests/t0.s @@ -74,3 +74,4 @@ l1: bit 0, [hl] ld bc, l1 + 1 +@local1: -- 2.30.2