[MCI] Small fix

Christian Costa titan.costa at wanadoo.fr
Fri Feb 18 04:28:49 CST 2005


Hi,

Changelog:
Fixed offsets calculations.

Christian Costa   titan.costa at wanadoo.fr

-------------- next part --------------
Index: dlls/winmm/mci.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/mci.c,v
retrieving revision 1.57
diff -u -r1.57 mci.c
--- dlls/winmm/mci.c	9 Feb 2005 22:26:26 -0000	1.57
+++ dlls/winmm/mci.c	18 Feb 2005 09:06:09 -0000
@@ -975,8 +975,8 @@
  */
 static	DWORD		MCI_GetReturnType(LPCWSTR lpCmd)
 {
-    lpCmd += strlenW(lpCmd) + 1 + sizeof(DWORD) + sizeof(WORD);
-    if (*lpCmd == '\0' && *(const WORD*)(lpCmd + 1 + sizeof(DWORD)) == MCI_RETURN) {
+    lpCmd = (LPCWSTR)((BYTE*)(lpCmd + strlenW(lpCmd) + 1) + sizeof(DWORD) + sizeof(WORD));
+    if (*lpCmd == '\0' && *(const WORD*)((BYTE*)(lpCmd + 1) + sizeof(DWORD)) == MCI_RETURN) {
 	return *(const DWORD*)(lpCmd + 1);
     }
     return 0L;


More information about the wine-patches mailing list