From 3c1ce2d64919e0fb9b28f0697addb87708f4f6ed Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 10 Mar 2009 10:16:37 -0600 Subject: [PATCH] mesa: fix dumb sizeof() vs. strlen() mix-up --- src/mesa/shader/prog_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2