listview: last column problem

Rein Klazes rklazes at xs4all.nl
Wed Oct 30 13:32:05 CST 2002


On Wed, 30 Oct 2002 14:21:13 -0500, you wrote:

> On October 30, 2002 02:01 pm, Rein Klazes wrote:
> > Do you see any objections removing the test and error message?
> 
> Good catch. Please try this patch:
> 
> Index: dlls/comctl32/listview.c
> ===================================================================
> RCS file: /var/cvs/wine/dlls/comctl32/listview.c,v
> retrieving revision 1.325
> diff -u -r1.325 listview.c
> --- dlls/comctl32/listview.c	28 Oct 2002 21:21:42 -0000	1.325
> +++ dlls/comctl32/listview.c	30 Oct 2002 19:19:35 -0000
> @@ -6044,7 +6044,8 @@
>  
>      TRACE("(nColumn=%d, lpColumn=%s, isW=%d)\n", nColumn, debuglvcolumn_t(lpColumn, isW), isW);
>  
> -    if (!lpColumn || nColumn < 0 || nColumn > infoPtr->hdpaColumns->nItemCount) return -1;
> +    if (!lpColumn || nColumn < 0) return -1;
> +    nColumn = min(nColumn, infoPtr->hdpaColumns->nItemCount);
>      
>      ZeroMemory(&hdi, sizeof(HDITEMW));
>      column_fill_hditem(infoPtr, &hdi, nColumn, lpColumn, isW);


Works fine.

Rein.
-- 
Rein Klazes
rklazes at xs4all.nl



More information about the wine-devel mailing list