]> git.sur5r.net Git - cc65/commitdiff
Fix detection of byte sized expressions
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 1 Dec 2000 09:04:07 +0000 (09:04 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 1 Dec 2000 09:04:07 +0000 (09:04 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@503 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ca65/expr.c

index 3e09dee13d91f2876348925fce6ba551becd51b6..7d20da271035bd76cc476c163a9997f5a17278fb 100644 (file)
@@ -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: