From 421c8771dc6c8924354a20739dd653378ec3ec62 Mon Sep 17 00:00:00 2001 From: cuz Date: Tue, 17 Dec 2002 11:39:02 +0000 Subject: [PATCH] Fixed a bug git-svn-id: svn://svn.cc65.org/cc65/trunk@1783 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/typecast.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cc65/typecast.c b/src/cc65/typecast.c index 406680a77..ec9409a12 100644 --- a/src/cc65/typecast.c +++ b/src/cc65/typecast.c @@ -73,8 +73,10 @@ int TypeCast (ExprDesc* lval) /* Read the expression we have to cast */ k = hie10 (lval); - /* If the expression is a function, treat it as pointer-to-function */ - if (IsTypeFunc (lval->Type)) { + /* If the expression is a function or an array, treat it as + * "pointer to type" + */ + if (IsTypeFunc (lval->Type) || IsTypeArray (lval->Type)) { lval->Type = PointerTo (lval->Type); } -- 2.39.5