forked from github/server
empty convoys cannot be built on.
This commit is contained in:
parent
1eaa6a9ec4
commit
76468197d7
1 changed files with 7 additions and 5 deletions
|
@ -146,12 +146,14 @@ void sunhash(ship * s)
|
||||||
|
|
||||||
static ship *sfindhash(int i)
|
static ship *sfindhash(int i)
|
||||||
{
|
{
|
||||||
ship *old;
|
ship *sh;
|
||||||
|
|
||||||
for (old = shiphash[i % MAXSHIPHASH]; old; old = old->nexthash)
|
for (sh = shiphash[i % MAXSHIPHASH]; sh; sh = sh->nexthash) {
|
||||||
if (old->no == i)
|
if (sh->no == i) {
|
||||||
return old;
|
return sh->number > 0 ? sh : NULL;
|
||||||
return 0;
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ship *findship(int i)
|
struct ship *findship(int i)
|
||||||
|
|
Loading…
Reference in a new issue