From 806dc4249c884feaa622a342262cd49590abda1f Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Thu, 14 Feb 2008 14:38:40 +0000 Subject: [PATCH] dxdiagn: Fix the character count passed to snprintfW in DXDiag_AddFileDescContainer and DXDiag_InitDXDiagDisplayContainer. --- dlls/dxdiagn/provider.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c index fb18a35070b..4c19d02c7b0 100644 --- a/dlls/dxdiagn/provider.c +++ b/dlls/dxdiagn/provider.c @@ -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 ); } -- 2.11.4.GIT