From: Brian Paul Date: Tue, 10 Mar 2009 16:16:37 +0000 (-0600) Subject: mesa: fix dumb sizeof() vs. strlen() mix-up X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3c1ce2d64919e0fb9b28f0697addb87708f4f6ed;p=mesa.git mesa: fix dumb sizeof() vs. strlen() mix-up --- 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);