[PATCH] ddraw/tests: Pass the correct size to VirtualQuery().

Zebediah Figura zfigura at codeweavers.com
Tue Nov 23 16:16:23 CST 2021


Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 dlls/ddraw/tests/ddraw1.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index 65cd271d2a6..b8a7f909c89 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -14122,14 +14122,14 @@ done:
     DestroyWindow(window);
 }
 
-static void check_vtbl_protection_(int line, const void *vtbl, SIZE_T size)
+static void check_vtbl_protection_(int line, const void *vtbl)
 {
     MEMORY_BASIC_INFORMATION info;
-    SIZE_T ret = VirtualQuery(vtbl, &info, size);
+    SIZE_T ret = VirtualQuery(vtbl, &info, sizeof(info));
     ok_(__FILE__, line)(ret == sizeof(info), "Failed to query memory.\n");
     ok_(__FILE__, line)(info.Protect & (PAGE_READWRITE | PAGE_WRITECOPY), "Got protection %#x.\n", info.Protect);
 }
-#define check_vtbl_protection(a) check_vtbl_protection_(__LINE__, a, sizeof(*(a)))
+#define check_vtbl_protection(a) check_vtbl_protection_(__LINE__, a)
 
 static void test_vtbl_protection(void)
 {
-- 
2.33.0




More information about the wine-devel mailing list