[PATCH] riched20: Properly handle \0 inside text and add test

Huw Davies huw at codeweavers.com
Fri Nov 9 03:29:56 CST 2018


On Thu, Nov 08, 2018 at 04:26:47PM +0100, Fabian Maurer wrote:
> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43630
> Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
> ---
>  dlls/riched20/reader.c       |  2 +-
>  dlls/riched20/tests/editor.c | 35 +++++++++++++++++++++++++++++++++++
>  2 files changed, 36 insertions(+), 1 deletion(-)
> 
> diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
> index 85c607becf..7975f3647c 100644
> --- a/dlls/riched20/tests/editor.c
> +++ b/dlls/riched20/tests/editor.c
> @@ -5754,6 +5754,29 @@ static DWORD CALLBACK test_EM_STREAMIN_esCallback_UTF8Split(DWORD_PTR dwCookie,
>      return 0;
>  }
>  
> +static DWORD CALLBACK test_EM_STREAMIN_NullBytes(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
> +{
> +    DWORD *phase = (DWORD *)dwCookie;
> +
> +   if (*phase == 0)
> +   {

The indentation here is strange.  I've sent in a new version with
this fixed and some other cosmeetic changes.

Thanks,
Huw.



More information about the wine-devel mailing list