From 1b36c218216cf7cd7793be7973efa882bac8cadd Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Sun, 8 Aug 2021 00:46:38 +0200 Subject: [PATCH] user32/tests: Use wine_dbgstr_a() instead of %.8s. This should better handle NULL pointers and bad strings. Signed-off-by: Francois Gouget Signed-off-by: Alexandre Julliard --- dlls/user32/tests/clipboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c index c8de860f8cc..b10ffaf4c8f 100644 --- a/dlls/user32/tests/clipboard.c +++ b/dlls/user32/tests/clipboard.c @@ -1927,7 +1927,7 @@ static void test_data_handles(void) ok( is_fixed( h ), "expected fixed mem %p\n", h ); ok( is_moveable( text ), "expected moveable mem %p\n", text ); ptr = GlobalLock( h ); - ok( !strcmp( ptr, "foobar" ), "wrong data '%.8s'\n", ptr ); + ok( ptr && !strcmp( ptr, "foobar" ), "wrong data %s\n", wine_dbgstr_a(ptr) ); GlobalUnlock( h ); r = EmptyClipboard();