wined3d: Fix source rectangle validation in wined3d_device_update_surface().

This commit is contained in:
Henri Verbeet 2011-06-16 00:40:28 +02:00 committed by Alexandre Julliard
parent e3991b9706
commit 6f710d18fc
1 changed files with 2 additions and 2 deletions

View File

@ -4786,8 +4786,8 @@ HRESULT CDECL wined3d_device_update_surface(struct wined3d_device *device,
r.bottom = src_surface->resource.height;
src_rect = &r;
}
else if (src_rect->left < 0 || src_rect->left >= r.right
|| src_rect->top < 0 || src_rect->top >= r.bottom)
else if (src_rect->left < 0 || src_rect->left >= src_rect->right
|| src_rect->top < 0 || src_rect->top >= src_rect->bottom)
{
WARN("Invalid source rectangle.\n");
return WINED3DERR_INVALIDCALL;