gsdx-ogl: handle invalid gl_lengh in debug message

Mesa intel sets it to -1.

Close #1089
This commit is contained in:
Gregory Hainaut 2016-01-07 21:48:06 +01:00
parent 165d2860e4
commit 3451f7e760
1 changed files with 1 additions and 1 deletions

View File

@ -1522,7 +1522,7 @@ void GSDeviceOGL::CheckDebugLog()
// Note: used as a callback of DebugMessageCallback. Don't change the signature
void GSDeviceOGL::DebugOutputToFile(GLenum gl_source, GLenum gl_type, GLuint id, GLenum gl_severity, GLsizei gl_length, const GLchar *gl_message, const void* userParam)
{
std::string message(gl_message, gl_length);
std::string message(gl_message, gl_length >= 0 ? gl_length : strlen(gl_message));
std::string type, severity, source;
static int sev_counter = 0;
switch(gl_type) {