mesa: fix dumb sizeof() vs. strlen() mix-up
authorBrian Paul <brianp@vmware.com>
Tue, 10 Mar 2009 16:16:37 +0000 (10:16 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 10 Mar 2009 16:16:47 +0000 (10:16 -0600)
src/mesa/shader/prog_print.c

index 0a78a0a866768511f60a4a8e3820db189eff3fa0..3e006a4927342b8658833fdb269e97d5a9c6dbbf 100644 (file)
@@ -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);