mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-08 02:50:31 +00:00
Account for specified string lengths when storing GL source strings
This commit is contained in:
@@ -443,7 +443,9 @@ void WrappedOpenGL::glShaderSource(GLuint shader, GLsizei count, const GLchar *c
|
||||
m_Shaders[id].sources.reserve(count);
|
||||
|
||||
for(GLsizei i = 0; i < count; i++)
|
||||
m_Shaders[id].sources.push_back(string[i]);
|
||||
m_Shaders[id].sources.push_back((length && length[i] > 0)
|
||||
? std::string(string[i], string[i] + length[i])
|
||||
: std::string(string[i]));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user