[PATCH] wined3d: fix memcpy() size parameter in GetScissorRect

Norbert Lataille nlataill at gmail.com
Tue Dec 4 14:41:10 CST 2007


One-liner fix in wined3d for Gothic 3 game.
Size parameter of memcpy() is wrong in GetScissorRect(): sizeof(RECT*)
should be sizeof(RECT).


Norbert Lataille

 dlls/wined3d/device.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 1e53bcc..7248637 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3259,7 +3259,7 @@ static HRESULT WINAPI
IWineD3DDeviceImpl_SetScissorRect(IWineD3DDevice *iface, C
 static HRESULT WINAPI IWineD3DDeviceImpl_GetScissorRect(IWineD3DDevice
*iface, RECT* pRect) {
     IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;

-    memcpy(pRect, &This->updateStateBlock->scissorRect, sizeof(pRect));
+    memcpy(pRect, &This->updateStateBlock->scissorRect, sizeof(RECT));
     TRACE("(%p)Returning a Scissor Rect of %d:%d-%d:%d\n", This,
pRect->left, pRect->top, pRect->right, pRect->bottom);
     return WINED3D_OK;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-patches/attachments/20071204/8345c9a9/attachment.htm 

More information about the wine-patches mailing list