diff --git a/src/render_ogl.c b/src/render_ogl.c index 1630fc5..7830f02 100644 --- a/src/render_ogl.c +++ b/src/render_ogl.c @@ -255,6 +255,7 @@ static void ogl_build_programs() { char shader_path_tmp[MAX_PATH] = { 0 }; strncpy(shader_path_tmp, shader_path, sizeof(shader_path_tmp)); + shader_path[sizeof(shader_path_tmp) - 1] = '\0'; /* strncpy fix */ if (strlen(shader_path_tmp) <= sizeof(shader_path_tmp) - 8) {