empty convoys cannot be built on.

This commit is contained in:
Enno Rehling 2020-07-12 20:41:24 +02:00
parent 1eaa6a9ec4
commit 76468197d7

View file

@ -146,12 +146,14 @@ void sunhash(ship * s)
static ship *sfindhash(int i)
{
ship *old;
ship *sh;
for (old = shiphash[i % MAXSHIPHASH]; old; old = old->nexthash)
if (old->no == i)
return old;
return 0;
for (sh = shiphash[i % MAXSHIPHASH]; sh; sh = sh->nexthash) {
if (sh->no == i) {
return sh->number > 0 ? sh : NULL;
}
}
return NULL;
}
struct ship *findship(int i)