From: NHOrus Date: Thu, 24 Aug 2017 10:40:10 +0000 (+0300) Subject: Corrected limit for atloc, see init.c for filling double-linked list X-Git-Tag: 1.5~27 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=5e39abf730b464b677ed6bab42f9b9983189a1e2;p=open-adventure.git Corrected limit for atloc, see init.c for filling double-linked list --- diff --git a/saveresume.c b/saveresume.c index e4d9959..6027096 100644 --- a/saveresume.c +++ b/saveresume.c @@ -212,7 +212,7 @@ bool is_valid(struct game_t valgame) /* Check that we have objects at locations */ for (loc_t loc = LOC_NOWHERE; loc <= NLOCATIONS; loc++) { - if (valgame.atloc[loc] < NO_OBJECT || valgame.atloc[loc] > NLOCATIONS) { + if (valgame.atloc[loc] < NO_OBJECT || valgame.atloc[loc] > NOBJECTS * 2 + 1) { return false; } }