diff --git a/src/cc65/typecmp.c b/src/cc65/typecmp.c index 24d9a385f..f179bff14 100644 --- a/src/cc65/typecmp.c +++ b/src/cc65/typecmp.c @@ -203,8 +203,8 @@ static void DoCompare (const Type* lhs, const Type* rhs, typecmp_t* Result) if ((IsTypeEnum (lhs) || IsTypeEnum (rhs))) { /* Compare the tag types */ - Sym1 = GetESUSymEntry (lhs); - Sym2 = GetESUSymEntry (rhs); + Sym1 = IsTypeEnum (lhs) ? GetESUSymEntry (lhs) : 0; + Sym2 = IsTypeEnum (rhs) ? GetESUSymEntry (rhs) : 0; if (Sym1 != Sym2) { if (Sym1 == 0 || Sym2 == 0) {