From: cuz Date: Wed, 6 Feb 2002 13:36:25 +0000 (+0000) Subject: Correct the END value for a segment so that it shows the last address in X-Git-Tag: V2.12.0~2464 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=90fc74e8355fdaaf59288cf92c2812ecae59c86d;p=cc65 Correct the END value for a segment so that it shows the last address in use by this segment, not the start of the following one. git-svn-id: svn://svn.cc65.org/cc65/trunk@1148 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ld65/segments.c b/src/ld65/segments.c index e203af508..c65a1d344 100644 --- a/src/ld65/segments.c +++ b/src/ld65/segments.c @@ -632,8 +632,13 @@ void PrintSegmentMap (FILE* F) /* Print empty segments only if explicitly requested */ if (VerboseMap || S->Size > 0) { /* Print the segment data */ + long End = S->PC + S->Size; + if (S->Size > 0) { + /* Point to last element addressed */ + --End; + } fprintf (F, "%-20s %06lX %06lX %06lX\n", - S->Name, S->PC, S->PC + S->Size, S->Size); + S->Name, S->PC, End, S->Size); } }