]> Shamusworld >> Repos - rmac/blobdiff - object.c
Fix segfaulting when building .prg target on linux and cygwin.
[rmac] / object.c
index 2702c54ad4dd4cdf586f63351d5fc6bb7d60474b..367f78364b3800dad690d49e84ebea44f53f20b0 100644 (file)
--- a/object.c
+++ b/object.c
@@ -157,7 +157,7 @@ char * constr_symtab(register char * buf, SYM * sym, int globflag)
        else w |= AL_EXTERN;            /* imported symbol */
 
        *buf++ = w >> 8;
-       *buf++ = w;
+       *buf++ = (char)w;
 
        z = sym->svalue;
 
@@ -299,7 +299,7 @@ int WriteObject(int fd)
                if (t < ssize)
                        t = ssize;
 
-               buf = malloc((t + HDRSIZE) + HDRSIZE);
+               buf = malloc(t + HDRSIZE) + HDRSIZE;
 
                /*
                 *  Build object file header