From 9ce81f648517263cbc5a83883354c8589a3474c6 Mon Sep 17 00:00:00 2001 From: Doug Lyons Date: Wed, 6 Sep 2023 16:02:48 -0500 Subject: [PATCH] [WINHTTP_WINETEST] Skip wine_dbgstr_wn() call when returned text length is zero (#5656) On receiving a zero length response, do not try to print returned text using wine_dbgstr_wn(). Instead check the returned string for zero length and skip the print in that case. ROSTESTS-377 --- modules/rostests/winetests/winhttp/winhttp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/rostests/winetests/winhttp/winhttp.c b/modules/rostests/winetests/winhttp/winhttp.c index 776ee53e379..5655432f73b 100644 --- a/modules/rostests/winetests/winhttp/winhttp.c +++ b/modules/rostests/winetests/winhttp/winhttp.c @@ -4276,7 +4276,12 @@ static void test_IWinHttpRequest(int port) hr = IWinHttpRequest_get_ResponseText( req, &response ); ok( hr == S_OK, "got %08x\n", hr ); +#ifdef __REACTOS__ + ok( !memcmp(response, data_start, sizeof(data_start)), "got %s\n", + wine_dbgstr_wn(response, min(SysStringLen(response), 32)) ); +#else ok( !memcmp(response, data_start, sizeof(data_start)), "got %s\n", wine_dbgstr_wn(response, 32) ); +#endif SysFreeString( response ); IWinHttpRequest_Release( req );