Added patch to replace hardcoded values with sizeof(GUID) for d3dxof.

This commit is contained in:
Sebastian Lackner 2015-03-04 21:31:59 +01:00
parent e3616aa15c
commit 20e97e50b3
3 changed files with 60 additions and 0 deletions

1
debian/changelog vendored
View File

@ -36,6 +36,7 @@ wine-staging (1.7.38) UNRELEASED; urgency=low
* Added patch to fix crash when trying to switch back to a 16-bit stack.
* Added patches to improve performance by reusing old async IO structure if possible.
* Added patch to increase wineconsole commandline buffer size.
* Added patch to replace hardcoded values with sizeof(GUID) for d3dxof.
* Removed patch to properly call DriverUnload when unloading device drivers (accepted upstream).
* Removed patch to allow Accept-Encoding for HTTP/1.0 in wininet (accepted upstream).
* Removed patch to declare pDirectInputCreateEx in a MSVC compatible way (accepted upstream).

View File

@ -0,0 +1,43 @@
From 60d8abcd74abb34f8922c7b33742d73c47773ddf Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Mon, 22 Oct 2012 21:00:52 +0200
Subject: d3dxof: Use sizeof(GUID) instead of hardcoding the value.
---
dlls/d3dxof/d3dxof.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c
index 88647cf..d612109 100644
--- a/dlls/d3dxof/d3dxof.c
+++ b/dlls/d3dxof/d3dxof.c
@@ -619,7 +619,7 @@ static HRESULT WINAPI IDirectXFileDataImpl_GetId(IDirectXFileData* iface, LPGUID
if (!pGuid)
return DXFILEERR_BADVALUE;
- memcpy(pGuid, &This->pobj->class_id, 16);
+ memcpy(pGuid, &This->pobj->class_id, sizeof(GUID));
return DXFILE_OK;
}
@@ -667,7 +667,7 @@ static HRESULT WINAPI IDirectXFileDataImpl_GetType(IDirectXFileData* iface, cons
if (!pguid)
return DXFILEERR_BADVALUE;
- memcpy(&guid, &This->pobj->type, 16);
+ memcpy(&guid, &This->pobj->type, sizeof(GUID));
*pguid = &guid;
return DXFILE_OK;
@@ -886,7 +886,7 @@ static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetId(IDirectXFileDataRefere
if (!pGuid)
return DXFILEERR_BADVALUE;
- memcpy(pGuid, &This->ptarget->class_id, 16);
+ memcpy(pGuid, &This->ptarget->class_id, sizeof(GUID));
return DXFILE_OK;
}
--
2.3.0

View File

@ -85,6 +85,7 @@ patch_enable_all ()
enable_d3dx9_36_Optimize_Inplace="$1"
enable_d3dx9_36_Texture_Align="$1"
enable_d3dx9_36_UpdateSkinnedMesh="$1"
enable_d3dxof_Cleanup="$1"
enable_dbghelp_Debug_Symbols="$1"
enable_ddraw_Hotpatch="$1"
enable_ddraw_d3d_execute_buffer="$1"
@ -296,6 +297,9 @@ patch_enable ()
d3dx9_36-UpdateSkinnedMesh)
enable_d3dx9_36_UpdateSkinnedMesh="$2"
;;
d3dxof-Cleanup)
enable_d3dxof_Cleanup="$2"
;;
dbghelp-Debug_Symbols)
enable_dbghelp_Debug_Symbols="$2"
;;
@ -1546,6 +1550,18 @@ if test "$enable_d3dx9_36_UpdateSkinnedMesh" -eq 1; then
) >> "$patchlist"
fi
# Patchset d3dxof-Cleanup
# |
# | Modified files:
# | * dlls/d3dxof/d3dxof.c
# |
if test "$enable_d3dxof_Cleanup" -eq 1; then
patch_apply d3dxof-Cleanup/0001-d3dxof-Use-sizeof-GUID-instead-of-hardcoding-the-val.patch
(
echo '+ { "Christian Costa", "d3dxof: Use sizeof(GUID) instead of hardcoding the value.", 1 },';
) >> "$patchlist"
fi
# Patchset dbghelp-Debug_Symbols
# |
# | Modified files: