summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2017-03-05 17:06:14 +0000
committerfonsinchen <fonsinchen@openttd.org>2017-03-05 17:06:14 +0000
commit4e13285274e07dee3dac606f70064bccae2d67e3 (patch)
tree08dccc737f8c3e51e0e156efc23e061548df7fd9 /src
parentfa8d85b63213288bf653f95a2a189e87f9db1985 (diff)
downloadopenttd-4e13285274e07dee3dac606f70064bccae2d67e3.tar.xz
(svn r27770) -Fix [FS#6540]: Initialize variables in station_sl.cpp (JGR)
Diffstat (limited to 'src')
-rw-r--r--src/saveload/station_sl.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp
index 3db5e1f5f..391ba30a8 100644
--- a/src/saveload/station_sl.cpp
+++ b/src/saveload/station_sl.cpp
@@ -325,6 +325,10 @@ static void SwapPackets(GoodsEntry *ge)
static void Load_STNS()
{
+ _cargo_source_xy = 0;
+ _cargo_days = 0;
+ _cargo_feeder_share = 0;
+
int index;
while ((index = SlIterateArray()) != -1) {
Station *st = new (index) Station();
@@ -514,8 +518,9 @@ static void Save_STNN()
static void Load_STNN()
{
- int index;
+ _num_flows = 0;
+ int index;
while ((index = SlIterateArray()) != -1) {
bool waypoint = (SlReadByte() & FACIL_WAYPOINT) != 0;