From 9e3c19237630d689a0edff0bbec91226bba567e9 Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 28 Jan 2021 15:35:35 +0100 Subject: fix some little UB --- src/extras/custompipes_gl.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/extras/custompipes_gl.cpp b/src/extras/custompipes_gl.cpp index 67be4afd..8a574579 100644 --- a/src/extras/custompipes_gl.cpp +++ b/src/extras/custompipes_gl.cpp @@ -333,7 +333,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