aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webglrenderingcontext.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/webglrenderingcontext.rs')
-rw-r--r--components/script/dom/webglrenderingcontext.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs
index ad572751607..7cab80a22f1 100644
--- a/components/script/dom/webglrenderingcontext.rs
+++ b/components/script/dom/webglrenderingcontext.rs
@@ -471,7 +471,7 @@ impl WebGLRenderingContext {
}
fn vertex_attrib(&self, indx: u32, x: f32, y: f32, z: f32, w: f32) {
- if indx > self.limits.max_vertex_attribs {
+ if indx >= self.limits.max_vertex_attribs {
return self.webgl_error(InvalidValue);
}
@@ -2223,7 +2223,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
fn EnableVertexAttribArray(&self, attrib_id: u32) {
- if attrib_id > self.limits.max_vertex_attribs {
+ if attrib_id >= self.limits.max_vertex_attribs {
return self.webgl_error(InvalidValue);
}
@@ -2232,7 +2232,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
fn DisableVertexAttribArray(&self, attrib_id: u32) {
- if attrib_id > self.limits.max_vertex_attribs {
+ if attrib_id >= self.limits.max_vertex_attribs {
return self.webgl_error(InvalidValue);
}
@@ -3238,7 +3238,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
fn VertexAttribPointer(&self, attrib_id: u32, size: i32, data_type: u32,
normalized: bool, stride: i32, offset: i64) {
- if attrib_id > self.limits.max_vertex_attribs {
+ if attrib_id >= self.limits.max_vertex_attribs {
return self.webgl_error(InvalidValue);
}