(sct_pstage, sct_ptime, shp_pstage, shp_ptime, lnd_pstage, lnd_ptime):
Use `short' instead of `unsigned short'. With variables, plague stage and time were stored unsigned and used signed, which worked. Removal of variables dropped the conversion to signed, which broke plague_people() (plague.c rev. 1.6): stage didn't progress correctly due to catastrophic underflow of time.
This commit is contained in:
parent
03c96f90d8
commit
4a6346b0df
8 changed files with 17 additions and 17 deletions
|
@ -52,7 +52,7 @@ static int infect_people(struct natstr *, struct sctstr *);
|
|||
void
|
||||
do_plague(struct sctstr *sp, struct natstr *np, int etu)
|
||||
{
|
||||
u_short pstage, ptime;
|
||||
int pstage, ptime;
|
||||
int n;
|
||||
|
||||
if (opt_NO_PLAGUE) /* no plague nothing to do */
|
||||
|
@ -152,7 +152,7 @@ infect_people(struct natstr *np, struct sctstr *sp)
|
|||
*/
|
||||
int
|
||||
plague_people(struct natstr *np, short *vec,
|
||||
u_short *pstage, u_short *ptime,
|
||||
int *pstage, int *ptime,
|
||||
int etus)
|
||||
{
|
||||
int stage;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue