From: cuz Date: Fri, 1 Dec 2000 09:04:07 +0000 (+0000) Subject: Fix detection of byte sized expressions X-Git-Tag: V2.12.0~3037 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=81249b8d928ea92d04850b3957421da42ee4dc90;p=cc65 Fix detection of byte sized expressions git-svn-id: svn://svn.cc65.org/cc65/trunk@503 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65/expr.c b/src/ca65/expr.c index 3e09dee13..7d20da271 100644 --- a/src/ca65/expr.c +++ b/src/ca65/expr.c @@ -1107,10 +1107,13 @@ static void CheckByteExpr (const ExprNode* N, int* IsByte) case EXPR_LEAFNODE: switch (N->Op) { - case EXPR_SYMBOL: - if (SymIsZP (N->V.Sym)) { - *IsByte = 1; - } + case EXPR_SYMBOL: + if (SymIsZP (N->V.Sym)) { + *IsByte = 1; + } else if (SymHasExpr (N->V.Sym)) { + /* Check if this expression is a byte expression */ + *IsByte = IsByteExpr (GetSymExpr (N->V.Sym)); + } break; case EXPR_SEGMENT: