summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-10-21 14:56:23 +0000
committersmatz <smatz@openttd.org>2008-10-21 14:56:23 +0000
commitd871cbb8478e8d7fd9ad4c63cade92bb675c57bc (patch)
treeae8cde7258183cf7de31b0948fb32b5385802cb1 /src
parentccc39d5b15998ca281fbf5dbc6c51c60f3ebee4e (diff)
downloadopenttd-d871cbb8478e8d7fd9ad4c63cade92bb675c57bc.tar.xz
(svn r14508) -Fix (r14501): arrays were not properly zeroed
Diffstat (limited to 'src')
-rw-r--r--src/station_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 9f802cc4e..283a9d42a 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -425,7 +425,7 @@ static void ShowRejectOrAcceptNews(const Station *st, uint num_items, CargoID *c
void GetProductionAroundTiles(AcceptedCargo produced, TileIndex tile,
int w, int h, int rad)
{
- memset(produced, 0, sizeof(produced));
+ memset(produced, 0, sizeof(AcceptedCargo)); // sizeof(AcceptedCargo) != sizeof(produced) (== sizeof(uint *))
int x = TileX(tile);
int y = TileY(tile);
@@ -474,7 +474,7 @@ void GetProductionAroundTiles(AcceptedCargo produced, TileIndex tile,
void GetAcceptanceAroundTiles(AcceptedCargo accepts, TileIndex tile,
int w, int h, int rad)
{
- memset(accepts, 0, sizeof(accepts));
+ memset(accepts, 0, sizeof(AcceptedCargo)); // sizeof(AcceptedCargo) != sizeof(accepts) (== sizeof(uint *))
int x = TileX(tile);
int y = TileY(tile);