From: cuz Date: Wed, 11 May 2005 13:54:22 +0000 (+0000) Subject: Fixed a bug X-Git-Tag: V2.12.0~330 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b01c0cf2b7a202cd8a589d4b076f3b26e789c7c9;p=cc65 Fixed a bug git-svn-id: svn://svn.cc65.org/cc65/trunk@3511 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/expr.c b/src/cc65/expr.c index d2e8b7234..28be7e526 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -819,7 +819,8 @@ static void ArrayRef (ExprDesc* Expr) * address. This is true for most arrays and will produce a lot better * code. Check if this is a const base address. */ - ConstBaseAddr = (ED_IsLocConst (Expr) || ED_IsLocStack (Expr)); + ConstBaseAddr = ED_IsRVal (Expr) && + (ED_IsLocConst (Expr) || ED_IsLocStack (Expr)); /* If we have a constant base, we delay the address fetch */ GetCodePos (&Mark1);