diff --git a/polymer/eduke32/build/include/pragmas.h b/polymer/eduke32/build/include/pragmas.h index 4dad0594f..948dbfde1 100644 --- a/polymer/eduke32/build/include/pragmas.h +++ b/polymer/eduke32/build/include/pragmas.h @@ -2269,8 +2269,8 @@ static inline int32_t boundmulscale(int32_t a, int32_t d, int32_t c) { // courtesy of Ken int64_t p; p = (((int64_t)a)*((int64_t)d))>>c; - if (p >= INT_MAX) p = INT_MAX; - if (p < INT_MIN) p = INT_MIN; + if (p >= INT32_MAX) p = INT32_MAX; + if (p < INT32_MIN) p = INT32_MIN; return((int32_t)p); } diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 814b45f90..2b6cf1635 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -3240,7 +3240,7 @@ void overheadeditor(void) if (zoom >= 768) { int32_t alwaysshowgray = - (showinnergray || !(editorzrange[0]==INT32_MIN && editorzrange[1]==INT_MAX)); + (showinnergray || !(editorzrange[0]==INT32_MIN && editorzrange[1]==INT32_MAX)); for (i=0, k=0; (m32_sideview && k= 0 && scphyspages >= 0) - siz = (uint32_t)min(UINT_MAX, (int64_t)scpagesiz * (int64_t)scphyspages); + siz = (uint32_t)min(UINT32_MAX, (int64_t)scpagesiz * (int64_t)scphyspages); //initprintf("Bgetsysmemsize(): %d pages of %d bytes, %d bytes of system memory\n", // scphyspages, scpagesiz, siz); return siz; #else - return UINT_MAX; + return UINT32_MAX; #endif } diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 76ec60e5c..4845524d0 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -2687,7 +2687,7 @@ nullquote: int64_t dax=Gv_GetVarX(*insptr++), day=Gv_GetVarX(*insptr++); int64_t hypsq = dax*dax + day*day; - if (hypsq > (int64_t)INT_MAX) + if (hypsq > (int64_t)INT32_MAX) Gv_SetVarX(retvar, (int32_t)sqrt((double)hypsq)); else Gv_SetVarX(retvar, ksqrt((uint32_t)hypsq));