glsl: fix inequality in set_program_uniform()
authorBrian Paul <brianp@vmware.com>
Thu, 19 Feb 2009 00:40:44 +0000 (17:40 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 19 Feb 2009 00:48:13 +0000 (17:48 -0700)
We were off by one when checking for too many uniform values.

src/mesa/shader/shader_api.c

index 828d3f062acbfea3ffda7625a1e676007d7b220e..afd2c2af7deacddd7e2b1ffcd430c49d482266d5 100644 (file)
@@ -1660,7 +1660,7 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program,
       for (k = 0; k < count; k++) {
          GLfloat *uniformVal;
 
-         if (offset + k > slots) {
+         if (offset + k >= slots) {
             /* Extra array data is ignored */
             break;
          }