vehicle_gui.c
changeset 4354 10f4ce894eb1
parent 4344 7e123fec5b0b
child 4389 18d6ccfb5335
equal deleted inserted replaced
4353:1523114f43f0 4354:10f4ce894eb1
   122 	uint n = 0;
   122 	uint n = 0;
   123 	uint i;
   123 	uint i;
   124 
   124 
   125 	if (!(vl->flags & VL_REBUILD)) return;
   125 	if (!(vl->flags & VL_REBUILD)) return;
   126 
   126 
   127 	sort_list = malloc(GetVehiclePoolSize() * sizeof(sort_list[0]));
   127 	sort_list = malloc(GetVehicleArraySize() * sizeof(sort_list[0]));
   128 	if (sort_list == NULL) {
   128 	if (sort_list == NULL) {
   129 		error("Could not allocate memory for the vehicle-sorting-list");
   129 		error("Could not allocate memory for the vehicle-sorting-list");
   130 	}
   130 	}
   131 
   131 
   132 	DEBUG(misc, 1) ("Building vehicle list for player %d station %d...",
   132 	DEBUG(misc, 1) ("Building vehicle list for player %d station %d...",