From 90fc74e8355fdaaf59288cf92c2812ecae59c86d Mon Sep 17 00:00:00 2001 From: cuz Date: Wed, 6 Feb 2002 13:36:25 +0000 Subject: [PATCH] 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 --- src/ld65/segments.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); } } -- 2.39.5