From 9ca411968831ca7ab66c162e5297fa3db3c37774 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Sun, 5 Jan 2003 20:38:05 +0000 Subject: [PATCH] Fixed some bugs in cast operator. --- programs/winedbg/expr.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/programs/winedbg/expr.c b/programs/winedbg/expr.c index c40ef0a789e..2bd10a0d62b 100644 --- a/programs/winedbg/expr.c +++ b/programs/winedbg/expr.c @@ -321,15 +321,13 @@ DBG_VALUE DEBUG_EvalExpr(struct expr * exp) switch(exp->type) { case EXPR_TYPE_CAST: - rtn = DEBUG_EvalExpr(exp->un.cast.expr); - rtn.type = exp->un.cast.cast; - if (!rtn.type) + if (!exp->un.cast.cast) { DEBUG_Printf(DBG_CHN_MESG, "Can't cast to unknown type\n"); RaiseException(DEBUG_STATUS_BAD_TYPE, 0, 0, NULL); } - if (DEBUG_GetType(rtn.type) == DT_POINTER) - rtn.cookie = DV_TARGET; + rtn = DEBUG_EvalExpr(exp->un.cast.expr); + rtn.type = exp->un.cast.cast; break; case EXPR_TYPE_STRING: rtn.type = DEBUG_GetBasicType(DT_BASIC_STRING);