Commit 9ca41196 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Fixed some bugs in cast operator.

parent 52395b0e
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment