- Fix broken krand() follow changes in 1354d52c05 due to truncation occuring from FixedToInt() inline function.

Very very sorry... :'(
Fixes #321.
This commit is contained in:
Mitchell Richters 2020-09-06 16:37:04 +10:00
parent d6b80bda52
commit 72771aeb40

View file

@ -710,7 +710,7 @@ int32_t checksectorpointer(int16_t i, int16_t sectnum);
static FORCE_INLINE int32_t krand(void)
{
randomseed = (randomseed * 1664525ul) + 221297ul;
return FixedToInt(randomseed);
return ((uint32_t) randomseed)>>16;
}
#else
int32_t krand(void);