summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-roguelike/zangband/files/zangband-2.7.4c-rng.patch')
-rw-r--r--games-roguelike/zangband/files/zangband-2.7.4c-rng.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/games-roguelike/zangband/files/zangband-2.7.4c-rng.patch b/games-roguelike/zangband/files/zangband-2.7.4c-rng.patch
new file mode 100644
index 00000000000..4ac1b101dc8
--- /dev/null
+++ b/games-roguelike/zangband/files/zangband-2.7.4c-rng.patch
@@ -0,0 +1,11 @@
+--- zangband/src/z-rand.c
++++ zangband/src/z-rand.c
+@@ -168,7 +168,7 @@
+ r = (Rand_state[j] += Rand_state[Rand_place]);
+
+ /* Hack -- extract a 28-bit "random" number */
+- r = (r >> 4) / n;
++ r = ((r >> 4) & 0x0FFFFFFF) / n;
+
+ /* Advance the index */
+ Rand_place = j;