From 6f710d18fc1c3e6b077f8db6c64ed2bc84807ce2 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 16 Jun 2011 00:40:28 +0200 Subject: [PATCH] wined3d: Fix source rectangle validation in wined3d_device_update_surface(). --- dlls/wined3d/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index ba5db376668..ed528313714 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -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;