[PATCH 1/2] ntdll: tests: Fix printing of incorrect exception handler data

Martin Storsjö wine at gitlab.winehq.org
Thu Jun 9 03:28:20 CDT 2022


From: Martin Storsjö <martin at martin.st>

*(DWORD *)data is the value being compared; printing the 'data'
pointer itself provides little value here.

Signed-off-by: Martin Storsjö <martin at martin.st>
---
 dlls/ntdll/tests/exception.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 3e76b001147..aa24ae1704f 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -2123,7 +2123,7 @@ static void call_virtual_unwind( int testnum, const struct unwind_test *test )
         ok( handler == expected_handler || broken( test->broken_results && handler == broken_handler ),
                 "%u/%u: wrong handler %p/%p\n", testnum, i, handler, expected_handler );
         if (handler)
-            ok( *(DWORD *)data == 0x08070605, "%u/%u: wrong handler data %p\n", testnum, i, data );
+            ok( *(DWORD *)data == 0x08070605, "%u/%u: wrong handler data %p\n", testnum, i, *(DWORD *)data );
         else
             ok( data == (void *)0xdeadbeef, "%u/%u: handler data set to %p\n", testnum, i, data );
 
@@ -5144,7 +5144,7 @@ static void call_virtual_unwind( int testnum, const struct unwind_test *test )
             ok( (char *)handler == (char *)code_mem + 0x200,
                 "%u/%u: wrong handler %p/%p\n", testnum, i, handler, (char *)code_mem + 0x200 );
             if (handler) ok( *(DWORD *)data == 0x08070605,
-                             "%u/%u: wrong handler data %p\n", testnum, i, data );
+                             "%u/%u: wrong handler data %p\n", testnum, i, *(DWORD *)data );
         }
         else
         {
@@ -6822,7 +6822,7 @@ static void call_virtual_unwind( int testnum, const struct unwind_test *test )
             ok( (char *)handler == (char *)code_mem + 0x200,
                 "%u/%u: wrong handler %p/%p\n", testnum, i, handler, (char *)code_mem + 0x200 );
             if (handler) ok( *(DWORD *)data == 0x08070605,
-                             "%u/%u: wrong handler data %p\n", testnum, i, data );
+                             "%u/%u: wrong handler data %p\n", testnum, i, *(DWORD *)data );
         }
         else
         {
-- 
GitLab


https://gitlab.winehq.org/wine/wine/-/merge_requests/214



More information about the wine-devel mailing list