mirror of
https://github.com/cc65/cc65.git
synced 2025-01-11 11:30:13 +00:00
Fixed ICE on error cases such as '&func + int a'.
This commit is contained in:
parent
200b420562
commit
91fd30611a
@ -2850,8 +2850,11 @@ static void parseadd (ExprDesc* Expr, int DoArrayRef)
|
|||||||
} else {
|
} else {
|
||||||
/* OOPS */
|
/* OOPS */
|
||||||
AddDone = -1;
|
AddDone = -1;
|
||||||
|
/* Avoid further errors */
|
||||||
|
ED_MakeConstAbsInt (Expr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!AddDone) {
|
||||||
/* Do constant calculation if we can */
|
/* Do constant calculation if we can */
|
||||||
if (ED_IsAbs (&Expr2) &&
|
if (ED_IsAbs (&Expr2) &&
|
||||||
(ED_IsAbs (Expr) || lscale == 1)) {
|
(ED_IsAbs (Expr) || lscale == 1)) {
|
||||||
@ -2872,6 +2875,7 @@ static void parseadd (ExprDesc* Expr, int DoArrayRef)
|
|||||||
*Expr = Expr2;
|
*Expr = Expr2;
|
||||||
AddDone = 1;
|
AddDone = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (AddDone) {
|
if (AddDone) {
|
||||||
/* Adjust the result for addition */
|
/* Adjust the result for addition */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user