Tony Wasserka : d3dx9: Fix an off by one error in point_filter_simple_data.
Alexandre Julliard
julliard at winehq.org
Mon Aug 23 10:50:19 CDT 2010
Module: wine
Branch: master
Commit: ecce9eebcf14ed31a4613e7fc7902a35bd2430d3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ecce9eebcf14ed31a4613e7fc7902a35bd2430d3
Author: Tony Wasserka <tony.wasserka at freenet.de>
Date: Sat Aug 21 13:07:09 2010 +0200
d3dx9: Fix an off by one error in point_filter_simple_data.
---
dlls/d3dx9_36/surface.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index ca4fd25..199209f 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -586,16 +586,16 @@ static void point_filter_simple_data(CONST BYTE *src, UINT srcpitch, POINT sr
for(y = 0;y < destsize.y;y++) {
BYTE *destptr = dest + y * destpitch;
const BYTE *bufptr = src + srcpitch * (y * srcsize.y / destsize.y);
- const BYTE *srcptr = bufptr;
for(x = 0;x < destsize.x;x++) {
+ const BYTE *srcptr = bufptr + (x * srcsize.x / destsize.x) * srcformat->bytes_per_pixel;
+
/* extract source color components */
if(srcformat->type == FORMAT_ARGB) get_relevant_argb_components(&conv_info, *(const DWORD*)srcptr, channels);
/* recombine the components */
if(destformat->type == FORMAT_ARGB) make_argb_color(&conv_info, channels, (DWORD*)destptr);
- srcptr = bufptr + (x * srcsize.x / destsize.x) * srcformat->bytes_per_pixel;
destptr += destformat->bytes_per_pixel;
}
}
More information about the wine-cvs
mailing list