webgl: Fix a typo in VertexAttrib1fv handling.

The VertexAttrib[234]fv compare to the same size as in their function
name.  This wasn't noticed becacuse this function isn't connected from
the .webidl yet.
This commit is contained in:
Eric Anholt 2016-08-10 22:58:15 -07:00
parent 476df17045
commit a21bbb78c4

View file

@ -1788,7 +1788,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
fn VertexAttrib1fv(&self, _cx: *mut JSContext, indx: u32, data: *mut JSObject) {
if let Some(data_vec) = array_buffer_view_to_vec_checked::<f32>(data) {
if data_vec.len() < 4 {
if data_vec.len() < 1 {
return self.webgl_error(InvalidOperation);
}
self.vertex_attrib(indx, data_vec[0], 0f32, 0f32, 1f32)