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
+++ b/src/util/prng.rs
@@ -18,7 +18,7 @@ impl Prng {
     ///
     /// 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
     }