summaryrefslogtreecommitdiff
path: root/gl.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-29 17:33:29 -0500
committerpommicket <pommicket@gmail.com>2022-12-29 17:33:29 -0500
commit5f7af06a9085835a3d1ad3a51374c245859d7d97 (patch)
treef8ea4ad4d809334131b479ff8b9c0bd125c45f29 /gl.c
parente4aac4859511cb22ed84946eb5510cd7fa14e147 (diff)
fix GCC warnings
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;