(svn r1921) -Fix: Out of bounds array access which caused oil rigs to accept other cargo types besides passengers and mail
authortron
Thu, 03 Mar 2005 19:54:46 +0000
changeset 1417 fd04b8a2eefc
parent 1416 f3ac4388c069
child 1418 1c235eb4197e
(svn r1921) -Fix: Out of bounds array access which caused oil rigs to accept other cargo types besides passengers and mail
station_cmd.c
variables.h
--- a/station_cmd.c	Thu Mar 03 14:56:28 2005 +0000
+++ b/station_cmd.c	Thu Mar 03 19:54:46 2005 +0000
@@ -60,8 +60,8 @@
 
 // FIXME -- need to be embedded into Airport variable. Is dynamically
 // deducteable from graphics-tile array, so will not be needed
-const byte _airport_size_x[5] = {4, 6, 1, 6, 7 };
-const byte _airport_size_y[5] = {3, 6, 1, 6, 7 };
+const byte _airport_size_x[] = {4, 6, 1, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
+const byte _airport_size_y[] = {3, 6, 1, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
 
 void ShowAircraftDepotWindow(uint tile);
 extern void UpdateAirplanesOnNewStation(Station *st);
--- a/variables.h	Thu Mar 03 14:56:28 2005 +0000
+++ b/variables.h	Thu Mar 03 19:54:46 2005 +0000
@@ -427,8 +427,8 @@
 /* station_cmd.c */
 // there are 5 types of airport (Country (3x4) , City(6x6), Metropolitan(6x6), International(7x7), Heliport(1x1)
 // will become obsolete once airports are loaded from seperate file
-extern const byte _airport_size_x[5];
-extern const byte _airport_size_y[5];
+extern const byte _airport_size_x[];
+extern const byte _airport_size_y[];
 
 /* misc */
 VARDEF char _screenshot_name[128];