mirror of
https://github.com/cc65/cc65.git
synced 2025-01-15 07:31:32 +00:00
Don't check for circular references of imports that don't have matching exports.
This fix will avoid referring to a struct member through a null pointer.
This commit is contained in:
parent
d5d9183ccf
commit
39ef63cbbc
@ -457,16 +457,14 @@ long GetExprVal (ExprNode* Expr)
|
||||
|
||||
static void GetSegExprValInternal (ExprNode* Expr, SegExprDesc* D, int Sign)
|
||||
/* Check if the given expression consists of a segment reference and only
|
||||
** constant values, additions and subtractions. If anything else is found,
|
||||
** constant values, additions, and subtractions. If anything else is found,
|
||||
** set D->TooComplex to true.
|
||||
** Internal, recursive routine.
|
||||
*/
|
||||
{
|
||||
Export* E;
|
||||
|
||||
if (Expr == 0) {
|
||||
return;
|
||||
}
|
||||
CHECK (Expr != 0);
|
||||
|
||||
switch (Expr->Op) {
|
||||
|
||||
@ -483,7 +481,7 @@ static void GetSegExprValInternal (ExprNode* Expr, SegExprDesc* D, int Sign)
|
||||
*/
|
||||
if (ExportHasMark (E)) {
|
||||
CircularRefError (E);
|
||||
} else {
|
||||
} else if (E->Expr != 0) {
|
||||
MarkExport (E);
|
||||
GetSegExprValInternal (E->Expr, D, Sign);
|
||||
UnmarkExport (E);
|
||||
|
Loading…
x
Reference in New Issue
Block a user