From 4eaf562a8aa8560cc5088c9feeed81bfdd857f97 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Wed, 7 Jun 2017 14:21:10 -0700 Subject: [PATCH] Add parentheses to correct interpretation of word-alignment check due to operator precedence confusion. --- src/gcmain3.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gcmain3.c b/src/gcmain3.c index ec6b932..7855d3f 100644 --- a/src/gcmain3.c +++ b/src/gcmain3.c @@ -401,7 +401,7 @@ LispPTR gcscanstack(void) { scanend68K = (UNSIGNED)Addr68k_from_LADDR(scanend); bascframe = (Bframe *)Addr68k_from_LADDR(scanptr); - if (0 != 3 & (UNSIGNED)bascframe) { + if (0 != (3 & (UNSIGNED)bascframe)) { char debugStr[100]; sprintf(debugStr, "Frame ptr (0x%x) not to word bound " @@ -481,7 +481,7 @@ LispPTR gcscanstack(void) { bascframe = (Bframe *)ADD_OFFSET(bascframe, FRAMESIZE + PADDING + (((fnheader->pv) + 1) << 2)); - if (0 != 3 & (UNSIGNED)bascframe) { + if (0 != (3 & (UNSIGNED)bascframe)) { char debugStr[100]; sprintf(debugStr, "Frame ptr (0x%x) not to word bound " @@ -502,7 +502,7 @@ LispPTR gcscanstack(void) { if (ntend != 0) { obascframe = bascframe; bascframe = (Bframe *)Addr68k_from_StkOffset(ntend); - if (0 != 3 & (UNSIGNED)bascframe) { + if (0 != (3 & (UNSIGNED)bascframe)) { char debugStr[100]; sprintf(debugStr, "Frame ptr (0x%x) not to word bound " @@ -519,7 +519,7 @@ LispPTR gcscanstack(void) { obascframe = bascframe; bascframe = (Bframe *)next; - if (0 != 3 & (UNSIGNED)bascframe) { + if (0 != (3 & (UNSIGNED)bascframe)) { char debugStr[100]; sprintf(debugStr, "Frame ptr (0x%x) not to word bound " @@ -539,7 +539,7 @@ LispPTR gcscanstack(void) { obascframe = bascframe; bascframe = (Bframe *)((DLword *)bascframe + bascframe->ivar); - if (0 != 3 & (UNSIGNED)bascframe) { + if (0 != (3 & (UNSIGNED)bascframe)) { char debugStr[100]; sprintf(debugStr, "Frame ptr (0x%x) not to word bound " @@ -554,7 +554,7 @@ LispPTR gcscanstack(void) { obascframe = bascframe; bascframe = (Bframe *)((DLword *)bascframe + bascframe->ivar); - if (0 != 3 & (UNSIGNED)bascframe) { + if (0 != (3 & (UNSIGNED)bascframe)) { char debugStr[100]; sprintf(debugStr, "Frame ptr (0x%x) not to word bound "