Fix const structs in arrays without braces

This commit is contained in:
drmortalwombat 2024-10-26 17:28:13 +02:00
parent 4fff9f7060
commit 5b81379dac
2 changed files with 7 additions and 4 deletions

View File

@ -22913,7 +22913,7 @@ void InterCodeProcedure::Close(void)
{ {
GrowingTypeArray tstack(IT_NONE); GrowingTypeArray tstack(IT_NONE);
CheckFunc = !strcmp(mIdent->mString, "room_show"); CheckFunc = !strcmp(mIdent->mString, "main");
CheckCase = false; CheckCase = false;
mEntryBlock = mBlocks[0]; mEntryBlock = mBlocks[0];

View File

@ -2347,12 +2347,15 @@ Expression* Parser::ParseConstInitExpression(Declaration* dtype, bool inner)
last = cdec; last = cdec;
} }
if (!ConsumeTokenIf(TK_COMMA))
break;
mdec = mdec->mNext; mdec = mdec->mNext;
while (!mdec && path.Size()) while (!mdec && path.Size())
mdec = path.Pop()->mParams; mdec = path.Pop()->mParams;
if (inner && !mdec)
break;
if (!ConsumeTokenIf(TK_COMMA))
break;
} }
else if (inner) else if (inner)
break; break;