From 7bfe2b06c359965e8b314282f963f9dd696b4229 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Fri, 5 Jan 2007 12:40:56 +0100 Subject: [PATCH] user32: If pTest was allocated, length has to be > 0 (Coverity). --- dlls/user32/combo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index 9674840b4cf..badb2effa2b 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -995,8 +995,7 @@ static INT CBUpdateLBox( LPHEADCOMBO lphc, BOOL bSelect ) if( pText ) { - if( length ) GetWindowTextW( lphc->hWndEdit, pText, length + 1); - else pText[0] = '\0'; + GetWindowTextW( lphc->hWndEdit, pText, length + 1); idx = SendMessageW(lphc->hWndLBox, LB_FINDSTRING, (WPARAM)(-1), (LPARAM)pText ); HeapFree( GetProcessHeap(), 0, pText );