dxdiagn: Fix the character count passed to snprintfW in DXDiag_AddFileDescContainer and DXDiag_InitDXDiagDisplayContainer.

This commit is contained in:
Rob Shearman 2008-02-14 14:38:40 +00:00 committed by Alexandre Julliard
parent f48941a2a8
commit 806dc4249c
1 changed files with 2 additions and 2 deletions

View File

@ -221,7 +221,7 @@ static HRESULT DXDiag_AddFileDescContainer(IDxDiagContainer* pSubCont, const WCH
VariantClear(&v);
if (boolret) {
snprintfW(szVersion_v, sizeof(szVersion_v),
snprintfW(szVersion_v, sizeof(szVersion_v)/sizeof(szVersion_v[0]),
szVersionFormat,
HIWORD(pFileInfo->dwFileVersionMS),
LOWORD(pFileInfo->dwFileVersionMS),
@ -466,7 +466,7 @@ static HRESULT DXDiag_InitDXDiagDisplayContainer(IDxDiagContainer* pSubCont)
{
static const WCHAR mem_fmt[] = {'%','.','1','f',' ','M','B',0};
snprintfW( buffer, sizeof(buffer), mem_fmt, ((float)tmp) / 1000000.0 );
snprintfW( buffer, sizeof(buffer)/sizeof(buffer[0]), mem_fmt, ((float)tmp) / 1000000.0 );
add_prop_str( pDisplayAdapterSubCont, szDisplayMemoryLocalized, buffer );
add_prop_str( pDisplayAdapterSubCont, szDisplayMemoryEnglish, buffer );
}