]> Shamusworld >> Repos - rmac/blobdiff - mark.c
Partial fix for bug #108 (Fixup cleanups).
[rmac] / mark.c
diff --git a/mark.c b/mark.c
index 955fcab0c7a81d0535c4e06b625be8dab1fae07a..53eaf871854bb87bcd7e32f6a36e519ebcf8250f 100644 (file)
--- a/mark.c
+++ b/mark.c
@@ -1,7 +1,7 @@
 //
 // RMAC - Reboot's Macro Assembler for all Atari computers
 // MARK.C - A record of things that are defined relative to any of the sections
-// Copyright (C) 199x Landon Dyer, 2011-2017 Reboot and Friends
+// Copyright (C) 199x Landon Dyer, 2011-2018 Reboot and Friends
 // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
 // Source utilised with the kind permission of Landon Dyer
 //
@@ -221,7 +221,7 @@ uint32_t MarkImage(register uint8_t * mp, uint32_t siz, uint32_t tsize, int okfl
 
                                        w |= symbol->senv << 3;
                                        *wp++ = w >> 8;
-                                       *wp = w;
+                                       *wp = (uint8_t)w;
                                }
                        }
                        else
@@ -483,6 +483,7 @@ uint32_t CreateELFRelocationRecord(uint8_t * buf, uint8_t * secBuf, uint16_t sec
 
        // Setup pointer for D_long/word/byte macros
        chptr = buf;
+       ch_size = 0;
 
        for(MCHUNK * mch=firstmch; mch!=NULL; mch=mch->mcnext)
        {