fix for duplicate astral plane

This commit is contained in:
Enno Rehling 2008-04-26 16:45:39 +00:00
parent bc5fa11611
commit 43422a0619

View file

@ -1609,8 +1609,14 @@ readgame(const char * filename, int mode, int backup)
planes = NULL;
n = store->r_int(store);
while(--n >= 0) {
plane *pl = calloc(1, sizeof(plane));
pl->id = store->r_int(store);
int id = store->r_int(store);
plane *pl = getplanebyid(id);
if (pl==NULL) {
calloc(1, sizeof(plane));
} else {
log_warning(("the plane with id=%d already exists.\n", id));
}
pl->id = id;
pl->name = store->r_str(store);
pl->minx = (short)store->r_int(store);
pl->maxx = (short)store->r_int(store);