From d825bbde06a35c3ea596b2f75804e903c8d84898 Mon Sep 17 00:00:00 2001 From: uz Date: Sun, 4 Nov 2012 12:58:17 +0000 Subject: [PATCH] Since there is now line info with type ASM and a count not equal to zero, the search for the toplevel line info had to be changed slightly. git-svn-id: svn://svn.cc65.org/cc65/trunk@5906 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ld65/lineinfo.c | 10 +++++----- src/ld65/lineinfo.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ld65/lineinfo.c b/src/ld65/lineinfo.c index 3e7817803..3ff8491c6 100644 --- a/src/ld65/lineinfo.c +++ b/src/ld65/lineinfo.c @@ -6,7 +6,7 @@ /* */ /* */ /* */ -/* (C) 2001-2011, Ullrich von Bassewitz */ +/* (C) 2001-2012, Ullrich von Bassewitz */ /* Roemerstrasse 52 */ /* D-70794 Filderstadt */ /* EMail: uz@cc65.org */ @@ -89,7 +89,7 @@ void FreeLineInfo (LineInfo* LI) LineInfo* DupLineInfo (const LineInfo* LI) /* Creates a duplicate of a line info structure */ -{ +{ /* Allocate memory */ LineInfo* New = xmalloc (sizeof (LineInfo)); @@ -176,8 +176,8 @@ void ReadLineInfoList (FILE* F, ObjData* O, Collection* LineInfos) const LineInfo* GetAsmLineInfo (const Collection* LineInfos) -/* Find a line info of type LI_TYPE_ASM in the given collection and return it. - * Return NULL if no such line info was found. +/* Find a line info of type LI_TYPE_ASM and count zero in the given collection + * and return it. Return NULL if no such line info was found. */ { unsigned I; @@ -185,7 +185,7 @@ const LineInfo* GetAsmLineInfo (const Collection* LineInfos) /* Search for a line info of LI_TYPE_ASM */ for (I = 0; I < CollCount (LineInfos); ++I) { const LineInfo* LI = CollConstAt (LineInfos, I); - if (LI_GET_TYPE (LI->Type) == LI_TYPE_ASM) { + if (LI->Type == LI_MAKE_TYPE (LI_TYPE_ASM, 0)) { return LI; } } diff --git a/src/ld65/lineinfo.h b/src/ld65/lineinfo.h index d9f2cf691..c965b2d67 100644 --- a/src/ld65/lineinfo.h +++ b/src/ld65/lineinfo.h @@ -6,7 +6,7 @@ /* */ /* */ /* */ -/* (C) 2001-2011, Ullrich von Bassewitz */ +/* (C) 2001-2012, Ullrich von Bassewitz */ /* Roemerstrasse 52 */ /* D-70794 Filderstadt */ /* EMail: uz@cc65.org */ @@ -106,8 +106,8 @@ void ReadLineInfoList (FILE* F, struct ObjData* O, Collection* LineInfos); */ const LineInfo* GetAsmLineInfo (const Collection* LineInfos); -/* Find a line info of type LI_TYPE_ASM in the given collection and return it. - * Return NULL if no such line info was found. +/* Find a line info of type LI_TYPE_ASM and count zero in the given collection + * and return it. Return NULL if no such line info was found. */ #if defined(HAVE_INLINE) -- 2.39.5