changeset 647:1520b559cacc

Double checked prng.
author Gauvain "GovanifY" Roussel-Tarbouriech <gauvain@govanify.com>
date Sun, 04 Aug 2019 00:07:46 +0200
parents 7d92730bf543
children 3331eb7389b3
files src/util/prng.rs
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/util/prng.rs	Sat Aug 03 23:30:15 2019 +0200
+++ b/src/util/prng.rs	Sun Aug 04 00:07:46 2019 +0200
@@ -18,7 +18,7 @@
     ///
     /// RE’d from 102h.exe@0x41e780
     pub fn get_u16(&mut self) -> u16 {
-        let x = ((self.seed ^ 0x9630) - 0x6553) & 0xffff;
+        let x = (self.seed ^ 0x9630) - 0x6553;
         self.seed = (((x & 0xc000) >> 14) | (x << 2)) & 0xffff;
         self.seed
     }