remove bad assumption

units on ships are not all at the end of the list, or ordered.
This commit is contained in:
Enno Rehling 2020-11-18 17:19:15 +01:00
parent e4e06dfcbe
commit e23d5e6949
1 changed files with 1 additions and 4 deletions

View File

@ -633,7 +633,7 @@ void move_ship(ship * sh, region * from, region * to, region_list * route)
leave_trail(sh, from, route);
}
if (route != NULL) {
if (route != NULL && from->units) {
unit** iunit = &from->units;
unit** ulist = &to->units;
unit* ufirst = NULL;
@ -658,9 +658,6 @@ void move_ship(ship * sh, region * from, region * to, region_list * route)
produceexp(u, SK_SAILING, u->number);
}
}
else if (ufirst) {
break;
}
else {
iunit = &u->next;
}