mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
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:
parent
476df17045
commit
a21bbb78c4
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue