]> Shamusworld >> Repos - rmac/blobdiff - sect.c
Fixes for last commit; version is now 1.10.0.
[rmac] / sect.c
diff --git a/sect.c b/sect.c
index 3e127656916367fa1f7573336582f7a951f9501e..3b2ed99dfb24590ed620dc4b183f4d7382db6a52 100644 (file)
--- a/sect.c
+++ b/sect.c
@@ -282,7 +282,7 @@ int chcheck(uint32_t amt)
 //
 // Arrange for a fixup on a location
 //
-int AddFixup(uint16_t attr, uint32_t loc, TOKEN * fexpr)
+int AddFixup(uint16_t attr, uint32_t loc, TOKENPTR fexpr)
 {
        uint32_t i = MIN_FIXUP_MEM;
        uint16_t len = 0;
@@ -291,7 +291,7 @@ int AddFixup(uint16_t attr, uint32_t loc, TOKEN * fexpr)
 
        // Compute length of expression (could be faster); determine if it's the
        // single-symbol case; no expression if it's just a mark. (? is this true?)
-       if ((*fexpr == SYMBOL) && (fexpr[2] == ENDEXPR))
+       if ((*fexpr.u32 == SYMBOL) && (fexpr.u32[2] == ENDEXPR))
        {
                // Just a single symbol, possibly followed by a DWORD
                i += sizeof(SYM *);
@@ -306,12 +306,12 @@ int AddFixup(uint16_t attr, uint32_t loc, TOKEN * fexpr)
                attr |= FU_EXPR;
 
                // Count the # of tokens in the expression
-               for(len=0; fexpr[len]!=ENDEXPR; len++)
+               for(len=0; fexpr.u32[len]!=ENDEXPR; len++)
                {
                        // Add one to len for 2X tokens, two for 3X tokens
-                       if (fexpr[len] == SYMBOL)
+                       if (fexpr.u32[len] == SYMBOL)
                                len++;
-                       else if (fexpr[len] == CONST)
+                       else if (fexpr.u32[len] == CONST)
                                len += 2;
                }
 
@@ -362,11 +362,11 @@ int AddFixup(uint16_t attr, uint32_t loc, TOKEN * fexpr)
                *fchptr.wp++ = len;
 
                while (len--)
-                       *fchptr.lp++ = *fexpr++;
+                       *fchptr.lp++ = *fexpr.u32++;
        }
        else
        {
-               *fchptr.sy++ = symbolPtr[fexpr[1]];
+               *fchptr.sy++ = symbolPtr[fexpr.u32[1]];
 
                // SCPCD: Correct bit mask for attr (else other FU_xxx will match)
                // NYAN !
@@ -464,7 +464,7 @@ int ResolveFixups(int sno)
                        {
                                i = *fup.wp++;
 
-                               if (evexpr(fup.tk, &eval, &eattr, &esym) != OK)
+                               if (evexpr((TOKENPTR)fup.tk, &eval, &eattr, &esym) != OK)
                                {
                                        fup.lp += i;
                                        continue;