Minor repair of savefile validation code.
This commit is contained in:
parent
1ef39055f3
commit
5b917084b0
1 changed files with 1 additions and 6 deletions
|
@ -184,12 +184,7 @@ bool is_valid(struct game_t valgame) {
|
||||||
|
|
||||||
/* Check for RNG overflow. Truncate */
|
/* Check for RNG overflow. Truncate */
|
||||||
if (valgame.lcg_x >= LCG_M) {
|
if (valgame.lcg_x >= LCG_M) {
|
||||||
valgame.lcg_x %= LCG_M; // LCOV_EXCL_LINE
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
/* Check for RNG underflow. Transpose */
|
|
||||||
if (valgame.lcg_x < LCG_M) {
|
|
||||||
valgame.lcg_x = LCG_M + (valgame.lcg_x % LCG_M);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Bounds check for locations */
|
/* Bounds check for locations */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue