https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9ce81f648517263cbc5a8…
commit 9ce81f648517263cbc5a83883354c8589a3474c6
Author: Doug Lyons <douglyons(a)douglyons.com>
AuthorDate: Wed Sep 6 16:02:48 2023 -0500
Commit: GitHub <noreply(a)github.com>
CommitDate: Thu Sep 7 00:02:48 2023 +0300
[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 );