Eric Pouech : winedbg: Fix result type in expression's computation.

Alexandre Julliard julliard at winehq.org
Tue Oct 12 16:12:48 CDT 2021


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

Author: Eric Pouech <eric.pouech at gmail.com>
Date:   Tue Oct 12 18:10:45 2021 +0200

winedbg: Fix result type in expression's computation.

All internal computation are made with DWORD_PTR and LONG_PTR,
so use corresponding internal type for the result.

Regression introduced in 0ea9fe999c1ed3a8b645476d97d2e0221be17bb5.

Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/winedbg/expr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/programs/winedbg/expr.c b/programs/winedbg/expr.c
index e58d394be35..f03ab25c003 100644
--- a/programs/winedbg/expr.c
+++ b/programs/winedbg/expr.c
@@ -476,7 +476,7 @@ struct dbg_lvalue expr_eval(struct expr* exp)
         exp2 = expr_eval(exp->un.binop.exp2);
         if (exp1.type.id == dbg_itype_none || exp2.type.id == dbg_itype_none)
             RaiseException(DEBUG_STATUS_BAD_TYPE, 0, 0, NULL);
-        rtn.type.id = dbg_itype_signed_int;
+        rtn.type.id = dbg_itype_signed_long_int;
         rtn.type.module = 0;
         rtn.addr.Offset = (ULONG_PTR)&exp->un.binop.result;
         type1 = exp1.type;
@@ -609,7 +609,7 @@ struct dbg_lvalue expr_eval(struct expr* exp)
         exp1 = expr_eval(exp->un.unop.exp1);
         if (exp1.type.id == dbg_itype_none) RaiseException(DEBUG_STATUS_BAD_TYPE, 0, 0, NULL);
         rtn.addr.Offset = (ULONG_PTR)&exp->un.unop.result;
-        rtn.type.id     = dbg_itype_signed_int;
+        rtn.type.id     = dbg_itype_signed_long_int;
         rtn.type.module = 0;
         switch (exp->un.unop.unop_type)
 	{




More information about the wine-cvs mailing list