summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/shader/prog_print.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c
index 0a78a0a8667..3e006a49273 100644
--- a/src/mesa/shader/prog_print.c
+++ b/src/mesa/shader/prog_print.c
@@ -918,7 +918,7 @@ _mesa_write_shader_to_file(const struct gl_shader *shader)
else
type = "vert";
- _mesa_snprintf(filename, strlen(filename), "shader_%u.%s", shader->Name, type);
+ _mesa_snprintf(filename, sizeof(filename), "shader_%u.%s", shader->Name, type);
f = fopen(filename, "w");
if (!f) {
fprintf(stderr, "Unable to open %s for writing\n", filename);