(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:
parent
974ffded01
commit
07ee157e2a
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue