If a procedure is the last on the list, make sure its size is correct
authorjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 20 Jun 2003 22:00:53 +0000 (22:00 +0000)
committerjesusc <jesusc@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 20 Jun 2003 22:00:53 +0000 (22:00 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2713 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
as/mcs51/lkaomf51.c

index a7154e606dce94a0102e1bdaa68a2e9d43958d7f..4f971d364a9f86a99cbb909724315fdad41a797d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-06-20  Jesus Calvino-Fraga <jesusc@ece.ubc.ca>
+
+       * as/mcs51/aomf51.c: Make sure the size of the last procedure is correct.
+
 2003-06-19  Borut Razem <borut.razem@siol.net>
 
        * src/z80/main.c: fixed Z80 port again: missing -k library paths in linker command line
index fa4611c60ad054c12809e48afd58706018cb84e0..fa009e7732d9ed71c379249e7889eccb2f7f706a 100644 (file)
@@ -378,6 +378,7 @@ void OutputAOEMF51(void)
 
                                /*Content Record*/
                                OutputByte(0x06);/*REC TYPE*/
+                               if(procedure[k].EndAdd==-1) procedure[k].EndAdd=HexSize;
                                recsize=procedure[k].EndAdd-procedure[k].BeginAdd+1+4;
                                OutputWord(recsize);/*Record Length*/
                                OutputByte(0x00);/*SEG ID*/