Fixed a bug (hopefully).
The ArrayRef() does really need a rewrite, now since we have better expression info. git-svn-id: svn://svn.cc65.org/cc65/trunk@3364 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -799,7 +799,7 @@ static void Primary (ExprDesc* E)
|
|||||||
|
|
||||||
|
|
||||||
static void ArrayRef (ExprDesc* Expr)
|
static void ArrayRef (ExprDesc* Expr)
|
||||||
/* Handle an array reference */
|
/* Handle an array reference. This function needs a rewrite. */
|
||||||
{
|
{
|
||||||
int ConstBaseAddr;
|
int ConstBaseAddr;
|
||||||
ExprDesc SubScript;
|
ExprDesc SubScript;
|
||||||
@@ -909,7 +909,7 @@ static void ArrayRef (ExprDesc* Expr)
|
|||||||
/* It's a pointer, so we do have to load it into the primary
|
/* It's a pointer, so we do have to load it into the primary
|
||||||
* first (if it's not already there).
|
* first (if it's not already there).
|
||||||
*/
|
*/
|
||||||
if (ConstBaseAddr) {
|
if (ConstBaseAddr || ED_IsLVal (Expr)) {
|
||||||
LoadExpr (CF_NONE, Expr);
|
LoadExpr (CF_NONE, Expr);
|
||||||
ED_MakeRValExpr (Expr);
|
ED_MakeRValExpr (Expr);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user