summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <idr@freedesktop.org>2010-09-27 07:28:36 -0700
committerIan Romanick <idr@freedesktop.org>2010-10-02 14:58:26 -0700
commit197b409f054b01e9b3c2595dd508f8b181fea19a (patch)
tree63dbceade79073143d07bc81808f6df75d05319c
parent3afaa0c43394055b05f3c7b2f4cef0ebbb876d0a (diff)
Fix bugs in vargs handling
Prevously gluAttachShaders would process the first shader twice. Even worse, gluBindAttributes would just process things wrong.
-rw-r--r--src/shader.c4
1 files 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 *);