fix the misterious crass caused by loading a .loc file a second time. This one

was very sneeky :)
This commit is contained in:
Bill Currie 2000-10-07 07:53:21 +00:00
parent dbda53e93b
commit ccd1f6f025

View file

@ -105,7 +105,8 @@ void locs_load(char *mapname)
loc[2] = strtol(t2, &t1, 0) * (1.0/8);
t1++;
t2 = strrchr(t1, '\n');
t2[0] = '\0';
if (t2)
t2[0] = '\0';
locs_add(loc, t1);
}
Qclose(file);
@ -122,6 +123,7 @@ void locs_reset()
}
free(locations);
locations=0;
locations_alloced = 0;
locations_count = 0;
}