[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
This commit is contained in:
Doug Lyons 2023-09-06 16:02:48 -05:00 committed by GitHub
parent 195c491880
commit 9ce81f6485
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 );