From fccc34906dc98def103046b2fd659710958f5eaa Mon Sep 17 00:00:00 2001 From: Mark Nefedov Date: Fri, 8 May 2020 18:34:03 +0300 Subject: Possible overflow. Consider casting operands, not the result. --- Graphics/GraphicsEngineOpenGL/src/VAOCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/src/VAOCache.cpp b/Graphics/GraphicsEngineOpenGL/src/VAOCache.cpp index cecadcba..8838b968 100644 --- a/Graphics/GraphicsEngineOpenGL/src/VAOCache.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/VAOCache.cpp @@ -190,7 +190,7 @@ const GLObjectWrappers::GLVertexArrayObj& VAOCache::GetVAO(IPipelineState* constexpr bool ResetVAO = false; GLState.BindBuffer(GL_ARRAY_BUFFER, pBufferOGL->m_GlBuffer, ResetVAO); - GLvoid* DataStartOffset = reinterpret_cast(static_cast(CurrStream.Offset + LayoutIt->RelativeOffset)); + GLvoid* DataStartOffset = reinterpret_cast(static_cast(CurrStream.Offset) + static_cast(LayoutIt->RelativeOffset)); auto GlType = TypeToGLType(LayoutIt->ValueType); if (!LayoutIt->IsNormalized && (LayoutIt->ValueType == VT_INT8 || -- cgit v1.2.3