From 8b3ab210be2448ed7ec5e78c0d3f1519bd7dbfce Mon Sep 17 00:00:00 2001 From: cuz Date: Mon, 17 Mar 2003 20:18:58 +0000 Subject: [PATCH] Fixed a bug in character literal handling git-svn-id: svn://svn.cc65.org/cc65/trunk@2029 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/expr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cc65/expr.c b/src/cc65/expr.c index df1ef8baa..92d6013d8 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -1105,9 +1105,10 @@ static int arrayref (int k, ExprDesc* lval) RemoveCode (Mark1); /* Handle constant base array on stack. Be sure NOT to - * handle pointers the same way, this won't work. + * handle pointers the same way, and check for character literals + * (both won't work). */ - if (IsTypeArray (tptr1) && + if (IsTypeArray (tptr1) && lval->Flags != (E_MCONST | E_TLIT) && ((lval->Flags & ~E_MCTYPE) == E_MCONST || (lval->Flags & ~E_MCTYPE) == E_MLOCAL || (lval->Flags & E_MGLOBAL) != 0 || -- 2.39.5