From d51a30ed2e6f3e21d36a173f0ff585ce28f68643 Mon Sep 17 00:00:00 2001 From: drmortalwombat <90205530+drmortalwombat@users.noreply.github.com> Date: Thu, 4 Nov 2021 18:28:35 +0100 Subject: [PATCH] Fix array type check --- oscar64/Declaration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oscar64/Declaration.cpp b/oscar64/Declaration.cpp index 10767de..b3a62bd 100644 --- a/oscar64/Declaration.cpp +++ b/oscar64/Declaration.cpp @@ -403,7 +403,7 @@ bool Declaration::IsSubType(const Declaration* dec) const return true; else if (mType == DT_TYPE_BOOL || mType == DT_TYPE_FLOAT || mType == DT_TYPE_VOID) return true; - else if (mType == DT_TYPE_STRUCT || mType == DT_TYPE_ENUM || DT_TYPE_UNION) + else if (mType == DT_TYPE_STRUCT || mType == DT_TYPE_ENUM || mType == DT_TYPE_UNION) return false; else if (mType == DT_TYPE_ARRAY) return mSize <= dec->mSize && mBase->IsSubType(dec->mBase);