X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=saveresume.c;h=c9278a413bf448ba6ec096a1fcbc711ac887f1c2;hb=04df0ce64c3d7413daaa19e19f476430768cccac;hp=d66854344733de47951fb7a3cd33f9eba356f72c;hpb=643656fcc35838d3e8b6e819fa8b1f9c4adda88c;p=open-adventure.git diff --git a/saveresume.c b/saveresume.c index d668543..c9278a4 100644 --- a/saveresume.c +++ b/saveresume.c @@ -137,7 +137,10 @@ int restore(FILE* fp) fclose(fp); if (save.version != VRSION) { rspeak(VERSION_SKEW, save.version / 10, MOD(save.version, 10), VRSION / 10, MOD(VRSION, 10)); - } else if (is_valid(save.game)) { + } else if (!is_valid(save.game)) { + rspeak(SAVE_TAMPERING); + exit(EXIT_SUCCESS); + } else { game = save.game; } return GO_TOP; @@ -230,7 +233,7 @@ bool is_valid(struct game_t valgame) case VASE: case CHAIN: if (valgame.prop[obj] == 2) // There are multiple different states, but it's convenient to clump them together - continue; + continue; // LCOV_EXCL_LINE /* FALLTHRU */ case BEAR: if (valgame.prop[BEAR] == CONTENTED_BEAR || valgame.prop[BEAR] == BEAR_DEAD)