user.exe16: Fixed incorrect sizeof() (Coverity).

This commit is contained in:
Marcus Meissner 2011-10-18 22:10:11 +02:00 committed by Alexandre Julliard
parent 31b3cbfb93
commit 90ca362013
1 changed files with 2 additions and 2 deletions

View File

@ -1357,7 +1357,7 @@ LONG WINAPI TabbedTextOut16( HDC16 hdc, INT16 x, INT16 y, LPCSTR lpstr,
INT16 count, INT16 nb_tabs, const INT16 *tabs16, INT16 tab_org ) INT16 count, INT16 nb_tabs, const INT16 *tabs16, INT16 tab_org )
{ {
LONG ret; LONG ret;
INT i, *tabs = HeapAlloc( GetProcessHeap(), 0, nb_tabs * sizeof(tabs) ); INT i, *tabs = HeapAlloc( GetProcessHeap(), 0, nb_tabs * sizeof(*tabs) );
if (!tabs) return 0; if (!tabs) return 0;
for (i = 0; i < nb_tabs; i++) tabs[i] = tabs16[i]; for (i = 0; i < nb_tabs; i++) tabs[i] = tabs16[i];
ret = TabbedTextOutA( HDC_32(hdc), x, y, lpstr, count, nb_tabs, tabs, tab_org ); ret = TabbedTextOutA( HDC_32(hdc), x, y, lpstr, count, nb_tabs, tabs, tab_org );
@ -1373,7 +1373,7 @@ DWORD WINAPI GetTabbedTextExtent16( HDC16 hdc, LPCSTR lpstr, INT16 count,
INT16 nb_tabs, const INT16 *tabs16 ) INT16 nb_tabs, const INT16 *tabs16 )
{ {
LONG ret; LONG ret;
INT i, *tabs = HeapAlloc( GetProcessHeap(), 0, nb_tabs * sizeof(tabs) ); INT i, *tabs = HeapAlloc( GetProcessHeap(), 0, nb_tabs * sizeof(*tabs) );
if (!tabs) return 0; if (!tabs) return 0;
for (i = 0; i < nb_tabs; i++) tabs[i] = tabs16[i]; for (i = 0; i < nb_tabs; i++) tabs[i] = tabs16[i];
ret = GetTabbedTextExtentA( HDC_32(hdc), lpstr, count, nb_tabs, tabs ); ret = GetTabbedTextExtentA( HDC_32(hdc), lpstr, count, nb_tabs, tabs );