From 197b409f054b01e9b3c2595dd508f8b181fea19a Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 27 Sep 2010 07:28:36 -0700 Subject: Fix bugs in vargs handling Prevously gluAttachShaders would process the first shader twice. Even worse, gluBindAttributes would just process things wrong. --- src/shader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shader.c b/src/shader.c index 0ef72f7..5ce4fab 100644 --- a/src/shader.c +++ b/src/shader.c @@ -227,7 +227,7 @@ gluAttachShaders(GLuint prog, GLuint shader, ...) AttachShader(prog, shader); - va_start(args, prog); + va_start(args, shader); while (true) { GLuint s = va_arg(args, GLuint); @@ -249,7 +249,7 @@ gluBindAttributes(GLuint prog, const char *name, GLuint location, ...) BindAttribLocation(prog, location, name); - va_start(args, prog); + va_start(args, location); while (true) { const char *name = va_arg(args, char *); -- cgit v1.2.3