fix misguided cppcheck fix for FixedDiv()

Replace with the corresponding implementation from Chocolate Doom,
to get back to the same demo compatibility as the original WinMBF.
This commit is contained in:
Fabian Greffrath 2020-01-16 11:40:44 +01:00
parent ea731b0409
commit 2a91c5f6bc

View File

@ -61,7 +61,7 @@ inline static fixed_t FixedMul(fixed_t a, fixed_t b)
inline static fixed_t FixedDiv(fixed_t a, fixed_t b)
{
return (abs(a)>>14) >= abs(b) ? ((unsigned)(a^b)>>31) ^ D_MAXINT :
return (abs(a)>>14) >= abs(b) ? ((a^b) < 0 ? D_MININT : D_MAXINT) :
(fixed_t)(((Long64) a << FRACBITS) / b);
}