--- a/station_cmd.c Sun May 08 21:00:56 2005 +0000
+++ b/station_cmd.c Mon May 09 13:26:15 2005 +0000
@@ -918,7 +918,7 @@
}
/** Build railroad station
- * @param x_org,y_org starting position of station dragging/placement
+ * @param x,y starting position of station dragging/placement
* @param p1 various bitstuffed elements
* - p1 = (bit 0) - orientation (p1 & 1)
* - p1 = (bit 8-15) - number of tracks (p1 >> 8) & 0xFF)
@@ -960,6 +960,8 @@
h_org = numtracks;
}
+ if (h_org > _patches.station_spread || w_org > _patches.station_spread) return CMD_ERROR;
+
// these values are those that will be stored in train_tile and station_platforms
finalvalues[0] = tile_org;
finalvalues[1] = w_org;