diff options
author | Yexo <yexo@openttd.org> | 2020-06-01 11:25:58 +0200 |
---|---|---|
committer | Yexo <t.marinussen@gmail.com> | 2020-06-01 12:44:02 +0200 |
commit | f827bc8c1ae83ea4f71347da9c8cb0468f386452 (patch) | |
tree | 6a2a90ef3da9e5b20063e175cfb6adbcc13741d6 /src/newgrf.h | |
parent | a9b3312d1a4962d07a2e7976e8352c7113201a9e (diff) | |
download | openttd-f827bc8c1ae83ea4f71347da9c8cb0468f386452.tar.xz |
Fix #8166: don't crash on loading an invalid roadtype newgrf
Initialization code for GRFFile::roadtype_map was copied from
railtype_map. But while RailType is a byte-sized enum and could thus
be initialized via memset, RoadType doesn't have a defined size.
Diffstat (limited to 'src/newgrf.h')
-rw-r--r-- | src/newgrf.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf.h b/src/newgrf.h index 00394c681..65df3698e 100644 --- a/src/newgrf.h +++ b/src/newgrf.h @@ -132,7 +132,7 @@ struct GRFFile : ZeroedMemoryAllocator { std::vector<RoadTypeLabel> roadtype_list; ///< Roadtype translation table (road) RoadType roadtype_map[ROADTYPE_END]; - std::vector<RoadTypeLabel> tramtype_list; ///, Roadtype translation table (tram) + std::vector<RoadTypeLabel> tramtype_list; ///< Roadtype translation table (tram) RoadType tramtype_map[ROADTYPE_END]; CanalProperties canal_local_properties[CF_END]; ///< Canal properties as set by this NewGRF |