From 7a39b85e30e7246f48c627981c02d0d6d977fb2f Mon Sep 17 00:00:00 2001 From: Greg King Date: Fri, 15 Jan 2016 17:18:09 -0500 Subject: [PATCH] Fixed how ca65's CONDES-type pseudo-instructions save line numbers (for error messages). --- src/ca65/symentry.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ca65/symentry.c b/src/ca65/symentry.c index f1459dca0..06c537cf6 100644 --- a/src/ca65/symentry.c +++ b/src/ca65/symentry.c @@ -570,8 +570,8 @@ void SymConDes (SymEntry* S, unsigned char AddrSize, unsigned Type, unsigned Pri } } - /* If the symbol was already declared as a condes, check if the new - ** priority value is the same as the old one. + /* If the symbol already was declared as a condes of this type, + ** check if the new priority value is the same as the old one. */ if (S->ConDesPrio[Type] != CD_PRIO_NONE) { if (S->ConDesPrio[Type] != Prio) { @@ -583,10 +583,8 @@ void SymConDes (SymEntry* S, unsigned char AddrSize, unsigned Type, unsigned Pri /* Set the symbol data */ S->Flags |= (SF_EXPORT | SF_REFERENCED); - /* In case we have no line info for the definition, record it now */ - if (CollCount (&S->DefLines) == 0) { - GetFullLineInfo (&S->DefLines); - } + /* Remember the line info for this reference */ + CollAppend (&S->RefLines, GetAsmLineInfo ()); } -- 2.39.5