Merge branch 'master' into jgrpp
# Conflicts: # src/blitter/32bpp_anim.hpp # src/blitter/32bpp_base.hpp # src/blitter/8bpp_base.hpp # src/blitter/null.hpp # src/cheat_gui.cpp # src/gfx.cpp # src/linkgraph/linkgraph.cpp # src/spriteloader/grf.cpp # src/station_cmd.cpp
This commit is contained in:
@@ -188,7 +188,7 @@ static bool ReadHeightmapPNG(const char *filename, uint *x, uint *y, byte **map)
|
||||
}
|
||||
|
||||
if (map != nullptr) {
|
||||
*map = MallocT<byte>(width * height);
|
||||
*map = MallocT<byte>(static_cast<size_t>(width) * height);
|
||||
ReadHeightmapPNGImageData(*map, png_ptr, info_ptr);
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ static bool ReadHeightmapBMP(const char *filename, uint *x, uint *y, byte **map)
|
||||
return false;
|
||||
}
|
||||
|
||||
*map = MallocT<byte>(info.width * info.height);
|
||||
*map = MallocT<byte>(static_cast<size_t>(info.width) * info.height);
|
||||
ReadHeightmapBMPImageData(*map, &info, &data);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user