diff --git a/packages/geo/GeoLib.cpp b/packages/geo/GeoLib.cpp index b9742d54..87b7edd9 100644 --- a/packages/geo/GeoLib.cpp +++ b/packages/geo/GeoLib.cpp @@ -550,7 +550,7 @@ bool GeoLib::writeBMP (const uint32_t* data, int width, int height, const char* for(int x = 0; x < width; x++) { const int offset = (y * width) + x; - uint32_t value = data[offset] - min_val; + const uint32_t value = data[offset] - min_val; const double normalized_pixel = (static_cast(value) / static_cast(max_val)) * 256.0; uint8_t scaled_pixel = static_cast(normalized_pixel); fwrite(&scaled_pixel, 1, 1, bmp_file);