Index: source/graphics/MapIO.cpp =================================================================== --- source/graphics/MapIO.cpp +++ source/graphics/MapIO.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2018 Wildfire Games. +/* Copyright (C) 2019 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -86,8 +86,9 @@ int offset = std::min(y, tileSize - 1) * mapLineSkip + std::min(x, tileSize - 1) * bytesPP; // Pick color channel with highest value - u16 value = std::max({mapdata[offset], mapdata[offset + bytesPP], mapdata[offset + bytesPP * 2]}); - value = mapdata[offset]; + u16 value = static_cast(std::max({mapdata[offset], + mapdata[offset + bytesPP], + mapdata[offset + bytesPP * 2]})); heightmap[(tileSize - y) * (tileSize + 1) + x] = clamp(value * 256, 0, 65535); }