From ebb615d0809fbc2893a390e0d2fd78ef42924111 Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 28 Jan 2021 15:30:32 +0100 Subject: fix some little UB --- src/extras/custompipes_gl.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/extras/custompipes_gl.cpp b/src/extras/custompipes_gl.cpp index 0c092c5f..caf9eb27 100644 --- a/src/extras/custompipes_gl.cpp +++ b/src/extras/custompipes_gl.cpp @@ -332,7 +332,12 @@ glossRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) V3d eyePos = rw::engine->currentCamera->getFrame()->getLTM()->pos; glUniform3fv(U(u_eye), 1, (float*)&eyePos); - glUniform4fv(U(u_reflProps), 1, (float*)&GlossMult); + float reflProps[4]; + reflProps[0] = GlossMult; + reflProps[1] = 0.0f; + reflProps[2] = 0.0f; + reflProps[3] = 0.0f; + glUniform4fv(U(u_reflProps), 1, reflProps); SetRenderState(VERTEXALPHA, TRUE); SetRenderState(SRCBLEND, BLENDONE); -- cgit v1.2.3