(load_it): Loaded negative amount if ship had more cargo than ordered.
This can happen when unload_it() can't unload, e.g. because sector is full. This can push the sector's amount beyond ITEM_MAX, and can even overflow to negative amounts.
This commit is contained in:
parent
67480d040d
commit
e8a089fe14
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ load_it(struct shpstr *sp, struct sctstr *psect, int i)
|
||||||
transfer = abs_max - ship_amt; /* then the max alowed */
|
transfer = abs_max - ship_amt; /* then the max alowed */
|
||||||
/* on the ship. */
|
/* on the ship. */
|
||||||
|
|
||||||
if (transfer == 0)
|
if (transfer <= 0)
|
||||||
return 0; /* nothing to move */
|
return 0; /* nothing to move */
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue