On Thu, Jan 31, 2002 at 03:40:04PM -0600, Aric Stewart wrote:
> Why where we setting the items text to NULL on GetItemW.
> 
> This appears to implement what the person was trying to do within the if
> 0 block.
> 
> Changelog: fix to GetItemW to stop whipping out the items text
> 
> -aric
> Index: dlls/comctl32/treeview.c
> ===================================================================
> RCS file: /home/wine/wine/dlls/comctl32/treeview.c,v
> retrieving revision 1.95
> diff -u -u -r1.95 treeview.c
> --- dlls/comctl32/treeview.c  2001/12/11 00:15:11     1.95
> +++ dlls/comctl32/treeview.c  2002/01/31 19:38:37
> @@ -1970,18 +1970,19 @@
...
> +            MultiByteToWideChar(CP_ACP, 0, wineItem->pszText,
> +                                strlen(wineItem->pszText), tvItem->pszText, 
> +                                tvItem->cchTextMax);

Hi Aric,

This won't copy the terminating '\0'.  It'd be better to use -1
instead of the strlen.

Huw.



Reply via email to