Fix #8: Potential read of unitialized memory in town growth tiles
This commit is contained in:
@@ -33,7 +33,7 @@ public:
|
||||
auto a = this->towns_growth_tiles.find(tile);
|
||||
auto b = this->towns_growth_tiles_last_month.find(tile);
|
||||
auto as = (a == this->towns_growth_tiles.end() ? TownGrowthTileState::NONE : (*a).second);
|
||||
auto bs = (b == this->towns_growth_tiles.end() ? TownGrowthTileState::NONE : (*b).second);
|
||||
auto bs = (b == this->towns_growth_tiles_last_month.end() ? TownGrowthTileState::NONE : (*b).second);
|
||||
return std::max(as, bs);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user