diff --git a/source/build/include/pragmas.h b/source/build/include/pragmas.h index 0efe3ee27..ebe3d4838 100644 --- a/source/build/include/pragmas.h +++ b/source/build/include/pragmas.h @@ -52,8 +52,8 @@ skip: static inline int64_t tabledivide64(int64_t const n, int64_t const d) { static libdivide::libdivide_s64_t sdiv; - static int32_t lastd; - auto const dptr = ((unsigned)d < DIVTABLESIZE) ? &divtable64[d] : &sdiv; + static int64_t lastd; + auto const dptr = ((uint64_t)d < DIVTABLESIZE) ? &divtable64[d] : &sdiv; if (d == lastd || dptr != &sdiv) goto skip; @@ -67,7 +67,7 @@ static inline int32_t tabledivide32(int32_t const n, int32_t const d) { static libdivide::libdivide_s32_t sdiv; static int32_t lastd; - auto const dptr = ((unsigned)d < DIVTABLESIZE) ? &divtable32[d] : &sdiv; + auto const dptr = ((uint32_t)d < DIVTABLESIZE) ? &divtable32[d] : &sdiv; if (d == lastd || dptr != &sdiv) goto skip;