Author: tkreuzer Date: Mon Apr 26 01:15:37 2010 New Revision: 47025
URL: http://svn.reactos.org/svn/reactos?rev=47025&view=rev Log: [STRSAFE] Fix calculation between cch and cb, it was inverted.
Modified: branches/ros-amd64-bringup/reactos/include/psdk/strsafe.h
Modified: branches/ros-amd64-bringup/reactos/include/psdk/strsafe.h URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/includ... ============================================================================== --- branches/ros-amd64-bringup/reactos/include/psdk/strsafe.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/psdk/strsafe.h [iso-8859-1] Mon Apr 26 01:15:37 2010 @@ -170,8 +170,8 @@
#define STRSAFE_CXXtoCB(x) (x) #define STRSAFE_CBtoCXX(x) (x) -#define STRSAFE_CXXtoCCH(x) (x)*sizeof(STRSAFE_TCHAR) -#define STRSAFE_CCHtoCXX(x) (x)/sizeof(STRSAFE_TCHAR) +#define STRSAFE_CXXtoCCH(x) (x)/sizeof(STRSAFE_TCHAR) +#define STRSAFE_CCHtoCXX(x) (x)*sizeof(STRSAFE_TCHAR) #define StringCxxCat StringCbCat #define StringCxxCatEx StringCbCatEx #define StringCxxCatN StringCbCatN @@ -191,8 +191,8 @@
#else // !STRSAFE_CB
-#define STRSAFE_CXXtoCB(x) (x)/sizeof(STRSAFE_TCHAR) -#define STRSAFE_CBtoCXX(x) (x)*sizeof(STRSAFE_TCHAR) +#define STRSAFE_CXXtoCB(x) (x)*sizeof(STRSAFE_TCHAR) +#define STRSAFE_CBtoCXX(x) (x)/sizeof(STRSAFE_TCHAR) #define STRSAFE_CXXtoCCH(x) (x) #define STRSAFE_CCHtoCXX(x) (x) #define StringCxxCat StringCchCat @@ -477,7 +477,7 @@ }
#if (STRSAFE_USE_SECURE_CRT == 1) - iResult = _vsntprintf_sAW(pszDest, cchDest, cchMax, pszFormat, args); + iResult = _vsnprintf_sAW(pszDest, cchDest, cchMax, pszFormat, args); #else iResult = _vsnprintfAW(pszDest, cchMax, pszFormat, args); #endif