From bccb1756b28c9f4790390ce89c8e8ea59e5c5744 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Wed, 3 Sep 2008 00:40:18 +0000 Subject: [PATCH] Replaced "CHAR" by "char": there is no mention of type CHAR on MSDN, the argument to which CHAR* is passed is documented as being char* and the function would be broken if sizeof(CHAR) would be different from 1. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@436 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_PadDX9/Src/MultiDI.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Plugins/Plugin_PadDX9/Src/MultiDI.cpp b/Source/Plugins/Plugin_PadDX9/Src/MultiDI.cpp index bc2c360e5f..a45124f10a 100644 --- a/Source/Plugins/Plugin_PadDX9/Src/MultiDI.cpp +++ b/Source/Plugins/Plugin_PadDX9/Src/MultiDI.cpp @@ -956,17 +956,17 @@ HRESULT DXUtil_ConvertGUIDToStringCch( const GUID* pGuidSrc, TCHAR* strDest, int //----------------------------------------------------------------------------- // Name: DXUtil_ConvertWideStringToAnsi() // Desc: This is a UNICODE conversion utility to convert a WCHAR string into a -// CHAR string. -// cchDestChar is the size in TCHARs of strDestination +// char string. +// cchDestChar is the size in bytes of strDestination //----------------------------------------------------------------------------- -HRESULT DXUtil_ConvertWideStringToAnsiCch( CHAR* strDestination, const WCHAR* wstrSource, +HRESULT DXUtil_ConvertWideStringToAnsiCch( char* strDestination, const WCHAR* wstrSource, int cchDestChar ) { if( strDestination==NULL || wstrSource==NULL || cchDestChar < 1 ) return E_INVALIDARG; int nResult = WideCharToMultiByte( CP_ACP, 0, wstrSource, -1, strDestination, - cchDestChar*sizeof(CHAR), NULL, NULL ); + cchDestChar, NULL, NULL ); strDestination[cchDestChar-1] = 0; if( nResult == 0 )