From 72771aeb408a80ed56b34e59b1937cb15c8527c6 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 6 Sep 2020 16:37:04 +1000 Subject: [PATCH] - Fix broken `krand()` follow changes in 1354d52c05799f50d804b1b97fd2143e626021de due to truncation occuring from `FixedToInt()` inline function. Very very sorry... :'( Fixes #321. --- source/build/include/build.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/build/include/build.h b/source/build/include/build.h index f12cc3a1d..938693037 100644 --- a/source/build/include/build.h +++ b/source/build/include/build.h @@ -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);