1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Avoid unsafety with stack-allocated mesh buffer

This commit is contained in:
sfan5 2024-08-29 16:01:29 +02:00 committed by SmallJoker
parent 166782040e
commit 1d042a977d

View file

@ -139,7 +139,7 @@ Hud::Hud(Client *client, LocalPlayer *player,
m_rotation_mesh_buffer.getMaterial().Lighting = false; m_rotation_mesh_buffer.getMaterial().Lighting = false;
m_rotation_mesh_buffer.getMaterial().MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL; m_rotation_mesh_buffer.getMaterial().MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
m_rotation_mesh_buffer.setHardwareMappingHint(scene::EHM_STATIC); //m_rotation_mesh_buffer.setHardwareMappingHint(scene::EHM_STATIC); // FIXME: incorrectly stack allocated, not safe!
} }
void Hud::readScalingSetting() void Hud::readScalingSetting()