summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorMark Nefedov <mark_nefedov@outlook.com>2020-05-08 15:34:03 +0000
committerMark Nefedov <mark_nefedov@outlook.com>2020-05-08 15:34:03 +0000
commitfccc34906dc98def103046b2fd659710958f5eaa (patch)
treedb10f8a24762d316fe99c78a47f1b82964d3a88e /Graphics/GraphicsEngineOpenGL
parentThe 'Key.Hash' variable was assigned the same value. (diff)
downloadDiligentCore-fccc34906dc98def103046b2fd659710958f5eaa.tar.gz
DiligentCore-fccc34906dc98def103046b2fd659710958f5eaa.zip
Possible overflow. Consider casting operands, not the result.
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/VAOCache.cpp2
1 files changed, 1 insertions, 1 deletions
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<GLvoid*>(static_cast<size_t>(CurrStream.Offset + LayoutIt->RelativeOffset));
+ GLvoid* DataStartOffset = reinterpret_cast<GLvoid*>(static_cast<size_t>(CurrStream.Offset) + static_cast<size_t>(LayoutIt->RelativeOffset));
auto GlType = TypeToGLType(LayoutIt->ValueType);
if (!LayoutIt->IsNormalized &&
(LayoutIt->ValueType == VT_INT8 ||