1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00

Correct memcpy usage

This commit is contained in:
Gymnasiast
2019-08-18 19:46:44 +02:00
parent 26b2809175
commit bf1f14b441

View File

@@ -1331,12 +1331,11 @@ void S6Exporter::ExportTileElements()
auto dst = &_s6.tile_elements[index];
if (src->base_height == 0xFF)
{
std::memcpy(dst, src, sizeof(*src));
std::memcpy(dst, src, sizeof(*dst));
}
else
{
auto tileElementType = (RCT12TileElementType)src->GetType();
// Todo: replace with setting invisibility bit
if (tileElementType == RCT12TileElementType::Corrupt || tileElementType == RCT12TileElementType::EightCarsCorrupt14
|| tileElementType == RCT12TileElementType::EightCarsCorrupt15)
std::memcpy(dst, src, sizeof(*dst));