(move_ground): explore() used endsect without initialized in certain

cases, e.g. `expl X,Y N X,Y'.  Other callers might have had similar
problems.  Fix: always assign to *END.  Thanks to Marc Olzheim for
help with debugging and fixing this.
This commit is contained in:
Markus Armbruster 2004-02-10 10:49:21 +00:00
parent 974ffded01
commit 07ee157e2a

View file

@ -76,6 +76,7 @@ move_ground(s_char *what, struct sctstr *start, struct sctstr *end,
s_char prompt[128];
s_char buf[1024];
*end = *start;
if (mobility <= 0.0)
return -1;
*dam = 0;
@ -101,7 +102,6 @@ move_ground(s_char *what, struct sctstr *start, struct sctstr *end,
}
if ((total_mcost * weight) > mobility) {
pr("Not enough mobility to go all the way. Nothing moved.\n");
*end = *start;
return -1;
}
}