From b01c0cf2b7a202cd8a589d4b076f3b26e789c7c9 Mon Sep 17 00:00:00 2001 From: cuz Date: Wed, 11 May 2005 13:54:22 +0000 Subject: [PATCH] Fixed a bug git-svn-id: svn://svn.cc65.org/cc65/trunk@3511 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/expr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.39.5