CMapArea: Fix incorrect pointer punning

This commit is contained in:
Luke Street 2022-05-31 20:51:14 -04:00
parent 6113f9356b
commit 52c8a82283
1 changed files with 1 additions and 2 deletions

View File

@ -273,12 +273,11 @@ void CMapArea::CMapAreaSurface::Draw(const zeus::CVector3f* verts, const zeus::C
if (lineColor.a()) { if (lineColor.a()) {
bool draw2 = lineWidth > 1.f; bool draw2 = lineWidth > 1.f;
u32 outlineCount = *reinterpret_cast<u32*>(&x1c_outlineOffset); u32 outlineCount = *reinterpret_cast<const u32*>(x1c_outlineOffset);
#if METAFORCE_TARGET_BYTE_ORDER == __ORDER_LITTLE_ENDIAN__ #if METAFORCE_TARGET_BYTE_ORDER == __ORDER_LITTLE_ENDIAN__
outlineCount = CBasics::SwapBytes(outlineCount); outlineCount = CBasics::SwapBytes(outlineCount);
#endif #endif
std::vector<CLineRenderer>& linePrims = instance.m_linePrims; std::vector<CLineRenderer>& linePrims = instance.m_linePrims;
zeus::CColor color = lineColor; zeus::CColor color = lineColor;
if (draw2) if (draw2)