From 0959a15b10e157a5ca6bb0b94d81b7a9c7d72f41 Mon Sep 17 00:00:00 2001 From: drmortalwombat <90205530+drmortalwombat@users.noreply.github.com> Date: Sun, 9 Feb 2025 22:10:39 +0100 Subject: [PATCH] Fixed striped structs with bitfields --- oscar64/Declaration.cpp | 5 +++++ oscar64/InterCode.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/oscar64/Declaration.cpp b/oscar64/Declaration.cpp index 2ce6db7..1588b1a 100644 --- a/oscar64/Declaration.cpp +++ b/oscar64/Declaration.cpp @@ -2113,6 +2113,7 @@ Declaration* Declaration::Clone(void) ndec->mOffset = mOffset; ndec->mStride = mStride; ndec->mStripe = mStripe; + ndec->mBits = mBits; ndec->mBase = mBase; ndec->mFlags = mFlags; ndec->mScope = mScope; @@ -2184,6 +2185,7 @@ Declaration* Declaration::ToStriped(int stripe) ndec->mOffset = mOffset * stripe; ndec->mStride = mStride; ndec->mStripe = stripe; + ndec->mBits = mBits; ndec->mFlags = mFlags; ndec->mIdent = mIdent; ndec->mQualIdent = mQualIdent; @@ -2258,6 +2260,7 @@ Declaration* Declaration::ToVolatileType(void) ndec->mSize = mSize; ndec->mStride = mStride; ndec->mBase = mBase; + ndec->mBits = mBits; ndec->mFlags = mFlags | DTF_VOLATILE; ndec->mScope = mScope; ndec->mParams = mParams; @@ -2313,6 +2316,7 @@ Declaration* Declaration::ToConstType(void) ndec->mStride = mStride; ndec->mStripe = mStripe; ndec->mBase = mBase; + ndec->mBits = mBits; ndec->mFlags = mFlags | DTF_CONST; ndec->mScope = mScope; ndec->mParams = mParams; @@ -2376,6 +2380,7 @@ Declaration* Declaration::ToMutableType(void) ndec->mStride = mStride; ndec->mStripe = mStripe; ndec->mBase = mBase; + ndec->mBits = mBits; ndec->mFlags = mFlags | DTF_CONST; ndec->mScope = mScope; ndec->mParams = mParams; diff --git a/oscar64/InterCode.cpp b/oscar64/InterCode.cpp index cef7f0e..73cb0c7 100644 --- a/oscar64/InterCode.cpp +++ b/oscar64/InterCode.cpp @@ -23226,7 +23226,7 @@ void InterCodeProcedure::Close(void) { GrowingTypeArray tstack(IT_NONE); - CheckFunc = !strcmp(mIdent->mString, "reuref::(cast)"); + CheckFunc = !strcmp(mIdent->mString, "shipyard_navigate"); CheckCase = false; mEntryBlock = mBlocks[0];