projects
/
open-adventure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ef3905
)
Minor repair of savefile validation code.
author
Eric S. Raymond
<esr@thyrsus.com>
Sun, 4 Feb 2024 16:43:36 +0000
(11:43 -0500)
committer
Eric S. Raymond
<esr@thyrsus.com>
Sun, 4 Feb 2024 16:43:36 +0000
(11:43 -0500)
saveresume.c
patch
|
blob
|
history
diff --git
a/saveresume.c
b/saveresume.c
index 9822b76409541dd1b4c2e286c7bd27feccbbeae2..100c925d400ab77c0dc2c5a354a5bfb24bac2f48 100644
(file)
--- a/
saveresume.c
+++ b/
saveresume.c
@@
-184,12
+184,7
@@
bool is_valid(struct game_t valgame) {
/* Check for RNG overflow. Truncate */
if (valgame.lcg_x >= LCG_M) {
- valgame.lcg_x %= LCG_M; // LCOV_EXCL_LINE
- }
-
- /* Check for RNG underflow. Transpose */
- if (valgame.lcg_x < LCG_M) {
- valgame.lcg_x = LCG_M + (valgame.lcg_x % LCG_M);
+ return false;
}
/* Bounds check for locations */