From c3d809b1296df85bb742ffe4bf140459998f9c3d Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Wed, 10 Apr 2019 13:43:35 +0300 Subject: [PATCH] Fix jmp-callax.c bug --- src/cc65/codeseg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cc65/codeseg.c b/src/cc65/codeseg.c index ba759988b..c27d105c9 100644 --- a/src/cc65/codeseg.c +++ b/src/cc65/codeseg.c @@ -426,8 +426,10 @@ static CodeEntry* ParseInsn (CodeSeg* S, LineInfo* LI, const char* L) unsigned Hash = HashStr (Arg) % CS_LABEL_HASH_SIZE; Label = CS_FindLabel (S, Arg, Hash); - /* If we don't have the label, it's a forward ref - create it */ - if (Label == 0) { + /* If we don't have the label, it's a forward ref - create it unless + ** it's an external function. + */ + if (Label == 0 && IsLocalLabelName(Arg)) { /* Generate a new label */ Label = CS_NewCodeLabel (S, Arg, Hash); } -- 2.39.5