Fixed some bugs in cast operator.

This commit is contained in:
Eric Pouech 2003-01-05 20:38:05 +00:00 committed by Alexandre Julliard
parent 52395b0eb9
commit 9ca4119688
1 changed files with 3 additions and 5 deletions

View File

@ -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);