Fixed a GCC compiler warning

This commit is contained in:
Leon Styhre 2024-06-23 21:39:02 +02:00
parent 4ddf13a833
commit cfa53c5097

View file

@ -273,11 +273,11 @@ void ShaderOpenGL::printShaderInfoLog(GLuint shaderID, GLenum shaderType, bool e
int maxLength;
glGetShaderiv(shaderID, GL_INFO_LOG_LENGTH, &maxLength);
std::vector<char> infoLog(maxLength);
if (infoLog.size() == 0)
if (maxLength == 0)
return;
std::vector<char> infoLog(maxLength);
glGetShaderInfoLog(shaderID, maxLength, &logLength, &infoLog.front());
if (logLength > 0) {