]> git.sur5r.net Git - cc65/blobdiff - src/cc65/assignment.c
Fixed a bug
[cc65] / src / cc65 / assignment.c
index a6f00ac13e7d7b7b752f9c7aa5a3470da3e264b8..196e0dcd93f26eb413c0123d7d16b256e18126ee 100644 (file)
@@ -87,7 +87,7 @@ int Assignment (ExprDesc* lval)
         if (UseReg) {
             PushAddr (lval);
         } else {
-           exprhs (0, 0, lval);
+           ExprLoad (0, 0, lval);
             g_push (CF_PTR | CF_UNSIGNED, 0);
         }
 
@@ -107,7 +107,7 @@ int Assignment (ExprDesc* lval)
                 lval2.Type = stype;
 
                 /* Load the value into the primary */
-                exprhs (CF_FORCECHAR, k, &lval2);
+                ExprLoad (CF_FORCECHAR, k, &lval2);
 
                 /* Store it into the new location */
                 Store (lval, stype);
@@ -115,7 +115,7 @@ int Assignment (ExprDesc* lval)
             } else {
 
                 /* We will use memcpy. Push the address of the rhs */
-                exprhs (0, 0, &lval2);
+                ExprLoad (0, 0, &lval2);
 
                 /* Push the address (or whatever is in ax in case of errors) */
                 g_push (CF_PTR | CF_UNSIGNED, 0);
@@ -158,7 +158,7 @@ int Assignment (ExprDesc* lval)
        k = TypeConversion (&lval2, k, ltype);
 
        /* If necessary, load the value into the primary register */
-       exprhs (CF_NONE, k, &lval2);
+       ExprLoad (CF_NONE, k, &lval2);
 
        /* Generate a store instruction */
        Store (lval, 0);