From 19c81ed8665f1062c176bcc75cb2f23a32f9ae03 Mon Sep 17 00:00:00 2001 From: acqn Date: Wed, 29 Jul 2020 19:51:47 +0800 Subject: [PATCH] Fixed type mask usage. --- src/cc65/typecmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cc65/typecmp.c b/src/cc65/typecmp.c index af04d8232..66dd9039b 100644 --- a/src/cc65/typecmp.c +++ b/src/cc65/typecmp.c @@ -215,8 +215,8 @@ static void DoCompare (const Type* lhs, const Type* rhs, typecmp_t* Result) } /* Get the left and right types, signs and qualifiers */ - LeftType = GetUnderlyingTypeCode (lhs); - RightType = GetUnderlyingTypeCode (rhs); + LeftType = (GetUnderlyingTypeCode (lhs) & T_MASK_TYPE); + RightType = (GetUnderlyingTypeCode (rhs) & T_MASK_TYPE); LeftSign = GetSignedness (lhs); RightSign = GetSignedness (rhs); LeftQual = GetQualifier (lhs);