[PATCH 2/2] libwine: get_sortkey to return consistent length with and without dstlen.

Dmitry Timoshkov dmitry at baikal.ru
Tue Mar 5 02:20:19 CST 2019


Brendan McGrath <brendan at redmandi.com> wrote:

> --- a/libs/wine/sortkey.c
> +++ b/libs/wine/sortkey.c
> @@ -80,7 +80,7 @@ int wine_get_sortkey(int flags, const WCHAR *src, int srclen, char *dst, int dst
>  
>      if (!dstlen) /* compute length */
>          /* 4 * '\1' + 1 * '\0' + key length */
> -        return key_len[0] + key_len[1] + key_len[2] + key_len[3] + 4 + 1;
> +        return key_len[0] + key_len[1] + key_len[2] + key_len[3] + 4;

Thanks for the patch. Probably the comment above should be adapted as well.

-- 
Dmitry.



More information about the wine-devel mailing list