Handle 0-length strings correctly when doing reflection emulation

This commit is contained in:
baldurk committed 2019-09-02 16:14:51 +01:00
1 parent 224b1877f4
commit 6e7f5691b5
1 file changed
+1 -1
@@ -437,7 +437,7 @@ 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((length && length[i] > 0)
m_Shaders[id].sources.push_back((length && length[i] >= 0)
? std::string(string[i], string[i] + length[i])
: std::string(string[i]));
}