summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3DBase
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-09-12 02:50:58 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-09-12 02:50:58 +0000
commita9002525abad03a8e5aab27daf2c2a0093fb47f6 (patch)
treec38237cdd1d1f7e0cebf962df642e90d0749d8dc /Graphics/GraphicsEngineD3DBase
parentRe-enabled d3d12 tests with dxc on CI (diff)
downloadDiligentCore-a9002525abad03a8e5aab27daf2c2a0093fb47f6.tar.gz
DiligentCore-a9002525abad03a8e5aab27daf2c2a0093fb47f6.zip
Fixed shader error log + fixed tests in Win8.1
Diffstat (limited to 'Graphics/GraphicsEngineD3DBase')
-rw-r--r--Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp b/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp
index d7ecad4b..053e3378 100644
--- a/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp
+++ b/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp
@@ -321,7 +321,8 @@ ShaderD3DBase::ShaderD3DBase(const ShaderCreateInfo& ShaderCI, const ShaderVersi
{
auto* pOutputDataBlob = MakeNewRCObj<DataBlobImpl>()(CompilerMsgLen + 1 + ShaderSource.length() + 1);
char* DataPtr = static_cast<char*>(pOutputDataBlob->GetDataPtr());
- memcpy(DataPtr, CompilerMsg, CompilerMsgLen + 1);
+ memcpy(DataPtr, CompilerMsg, CompilerMsgLen);
+ DataPtr[CompilerMsgLen] = 0; // Set null terminator
memcpy(DataPtr + CompilerMsgLen + 1, ShaderSource.data(), ShaderSource.length() + 1);
pOutputDataBlob->QueryInterface(IID_DataBlob, reinterpret_cast<IObject**>(ShaderCI.ppCompilerOutput));
}