Eric Pouech : winedbg: Don't assert on some lvalue's write conditions.

Alexandre Julliard julliard at winehq.org
Tue Apr 20 11:32:21 CDT 2010


Module: wine
Branch: master
Commit: e5555b0fb554a4f10f9e113d6ce4f89d8221adf2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e5555b0fb554a4f10f9e113d6ce4f89d8221adf2

Author: Eric Pouech <eric.pouech at orange.fr>
Date:   Mon Apr 19 22:33:46 2010 +0200

winedbg: Don't assert on some lvalue's write conditions.

---

 programs/winedbg/memory.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/programs/winedbg/memory.c b/programs/winedbg/memory.c
index 6560062..7d6112a 100644
--- a/programs/winedbg/memory.c
+++ b/programs/winedbg/memory.c
@@ -121,9 +121,13 @@ BOOL memory_write_value(const struct dbg_lvalue* lvalue, DWORD size, void* value
     BOOL        ret = TRUE;
     DWORD64     os;
 
-    os = ~(DWORD64)size;
-    types_get_info(&lvalue->type, TI_GET_LENGTH, &os);
-    assert(size == os);
+    if (!types_get_info(&lvalue->type, TI_GET_LENGTH, &os)) return FALSE;
+    if (size != os)
+    {
+        dbg_printf("Size mismatch in memory_write_value, got %u from type while expecting %u\n",
+                   (DWORD)os, size);
+        return FALSE;
+    }
 
     /* FIXME: only works on little endian systems */
     if (lvalue->cookie == DLV_TARGET)




More information about the wine-cvs mailing list