]> git.sur5r.net Git - cc65/commitdiff
Fix jmp-callax.c bug
authorLauri Kasanen <cand@gmx.com>
Wed, 10 Apr 2019 10:43:35 +0000 (13:43 +0300)
committergreg-king5 <greg.king5@verizon.net>
Sun, 21 Apr 2019 16:46:03 +0000 (12:46 -0400)
src/cc65/codeseg.c

index ba759988b2cd54447980b468a00e3987e6a2591f..c27d105c9cc9e160b20feda5491fff55fe42c181 100644 (file)
@@ -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);
         }