Bug 589901 - Fix validation typo in readPixels() - r=vladimir, a=blocking-beta5

This commit is contained in:
Benoit Jacob 2010-08-25 08:16:04 -04:00
parent b8ecdcd363
commit 44f7d1231b

View File

@ -2434,7 +2434,7 @@ WebGLContext::ReadPixels_base(WebGLint x, WebGLint y, WebGLsizei width, WebGLsiz
GLsizei subrect_height = subrect_end_y - subrect_y;
if (subrect_width < 0 || subrect_height < 0 ||
subrect_width > width || subrect_height)
subrect_width > width || subrect_height > height)
return ErrorInvalidOperation("ReadPixels: integer overflow computing clipped rect size");
// now we know that subrect_width is in the [0..width] interval, and same for heights.