Correct memcpy usage

This commit is contained in:
Gymnasiast committed 2019-08-18 19:46:44 +02:00
1 parent 26b2809175
commit bf1f14b441
1 file changed
+1 -2
+1 -2
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));