]> git.sur5r.net Git - cc65/commitdiff
Correct the END value for a segment so that it shows the last address in
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 6 Feb 2002 13:36:25 +0000 (13:36 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 6 Feb 2002 13:36:25 +0000 (13:36 +0000)
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

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