(svn r11057) -Fix [FS#1215]: loading TTD savegames went into an infinite loop due to not yet properly set next and previous pointers.

This commit is contained in:
rubidium
2007-09-07 22:06:52 +00:00
parent 88133a97b5
commit 704844ed43
2 changed files with 9 additions and 5 deletions

View File

@@ -1175,7 +1175,7 @@ static const OldChunks vehicle_chunk[] = {
OCL_END()
};
static bool LoadOldVehicle(LoadgameState *ls, int num)
bool LoadOldVehicle(LoadgameState *ls, int num)
{
uint i;
@@ -1206,7 +1206,7 @@ static bool LoadOldVehicle(LoadgameState *ls, int num)
default: v->spritenum >>= 1; break;
}
if (_old_next_ptr != 0xFFFF) v->SetNext(GetVehicle(_old_next_ptr));
if (_old_next_ptr != 0xFFFF) v->next = GetVehicle(_old_next_ptr);
v->string_id = RemapOldStringID(_old_string_id);