]> git.sur5r.net Git - cc65/blobdiff - src/cc65/stdfunc.c
Fixed several more problems like the one in Assignment() some time ago: An
[cc65] / src / cc65 / stdfunc.c
index b41210f4461d3e50687960f1366b3a759a0d37d7..4f48c4fc4d3c5626397f23790c1f3ced7227c318 100644 (file)
@@ -154,7 +154,7 @@ static void ParseArg (ArgDesc* Arg, Type* Type)
     GetCodePos (&Arg->Start);
 
     /* Read the expression we're going to pass to the function */
-    ExprWithCheck (hie1, &Arg->Expr);
+    MarkedExprWithCheck (hie1, &Arg->Expr);
 
     /* Remember the actual argument type */
     Arg->Type = Arg->Expr.Type;
@@ -165,7 +165,7 @@ static void ParseArg (ArgDesc* Arg, Type* Type)
     /* If the value is a constant, set the flag, otherwise load it into the
      * primary register.
      */
-    if (ED_IsConstAbsInt (&Arg->Expr)) {
+    if (ED_IsConstAbsInt (&Arg->Expr) && ED_CodeRangeIsEmpty (&Arg->Expr)) {
         /* Remember that we have a constant value */
         Arg->Flags |= CF_CONST;
     } else {