summaryrefslogtreecommitdiff
path: root/gl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gl.c')
-rw-r--r--gl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gl.c b/gl.c
index 31cbe96..2cf6a43 100644
--- a/gl.c
+++ b/gl.c
@@ -161,10 +161,11 @@ static GLuint gl_compile_shader(char error_buf[256], char const *code, GLenum sh
if (status == GL_FALSE) {
char log[1024] = {0};
glGetShaderInfoLog(shader, sizeof log - 1, NULL, log);
- if (error_buf)
+ if (error_buf) {
str_printf(error_buf, 256, "Error compiling shader: %s", log);
- else
+ } else {
debug_println("Error compiling shader: %s", log);
+ }
return 0;
}
return shader;