Skip to content

Commit

Permalink
Fix the error emitted for invalid targets in WebGLTexture::bind
Browse files Browse the repository at this point in the history
It doesn't actually matter because this is only called from
WebGLRenderingContext::BindTexture, which already checks the target,
but better be safe than sorry.
  • Loading branch information
nox committed Apr 9, 2018
1 parent e460b4a commit 68898f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/script/dom/webgltexture.rs
Expand Up @@ -109,7 +109,7 @@ impl WebGLTexture {
let face_count = match target {
constants::TEXTURE_2D => 1,
constants::TEXTURE_CUBE_MAP => 6,
_ => return Err(WebGLError::InvalidOperation)
_ => return Err(WebGLError::InvalidEnum)
};
self.face_count.set(face_count);
self.target.set(Some(target));
Expand Down

0 comments on commit 68898f4

Please sign in to comment.