Bug 635068 - WebGL test array-unit-tests.html fails - r=jag, a=blocking2.0
authorBenoit Jacob <bjacob@mozilla.com>
Thu, 03 Mar 2011 11:02:35 -0500
changeset 63317 195a7aceb72b
parent 63316 779f2ca8eb0c
child 63318 fb4921333812
push idunknown
push userunknown
push dateunknown
reviewersjag, blocking2
bugs635068
milestone2.0b13pre
Bug 635068 - WebGL test array-unit-tests.html fails - r=jag, a=blocking2.0
content/canvas/src/WebGLContextValidate.cpp
--- a/content/canvas/src/WebGLContextValidate.cpp
+++ b/content/canvas/src/WebGLContextValidate.cpp
@@ -373,19 +373,19 @@ PRBool WebGLContext::ValidateTexFormatAn
                 ErrorInvalidEnum("%s: invalid type 0x%x", info, type);
                 return PR_FALSE;
         }
     }
 }
 
 PRBool WebGLContext::ValidateAttribIndex(WebGLuint index, const char *info)
 {
-    if (index > mAttribBuffers.Length()) {
+    if (index >= mAttribBuffers.Length()) {
         if (index == WebGLuint(-1)) {
-             ErrorInvalidValue("%s: index -1 is invalid. That probably comes from a getAttribLication() call, "
+             ErrorInvalidValue("%s: index -1 is invalid. That probably comes from a getAttribLocation() call, "
                                "where this return value -1 means that the passed name didn't correspond to an active attribute in "
                                "the specified program.", info);
         } else {
              ErrorInvalidValue("%s: index %d is out of range", info, index);
         }
         return PR_FALSE;
     } else {
         return PR_TRUE;