Skip to content

Commit

Permalink
loading vehicles could cause overflow with old savegames
Browse files Browse the repository at this point in the history
git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@1074 8aca7d54-2c30-db11-9de9-000461428c89
  • Loading branch information
prissi committed Jun 23, 2007
1 parent 4b9ea86 commit 1e1016e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simvehikel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ vehikel_t::setze_convoi(convoi_t *c)
if(!welt->lookup(pos_prev)) {
pos_prev = welt->lookup_kartenboden(pos_prev.gib_2d())->gib_pos();
}
if(pos_next!=koord3d::invalid && !check_for_finish && (welt->lookup(pos_next)==NULL || welt->lookup(pos_next)->gib_weg(gib_waytype())==NULL)) {
if(pos_next!=koord3d::invalid && route_index<cnv->get_route()->gib_max_n() && (welt->lookup(pos_next)==NULL || welt->lookup(pos_next)->gib_weg(gib_waytype())==NULL)) {
pos_next = cnv->get_route()->position_bei(route_index+1);
}
// just correct freight deistinations
Expand Down

0 comments on commit 1e1016e

Please sign in to comment.