1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-06 00:05:59 +02:00

Merge pull request #1774 from disarray2077/patch-1

Fix infinite loop in `BfParser::NextToken`
This commit is contained in:
Brian Fiete 2022-12-20 06:28:33 -05:00 committed by GitHub
commit 3efa83a7a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2146,7 +2146,7 @@ void BfParser::NextToken(int endIdx, bool outerIsInterpolate, bool disablePrepro
newBlock->SetSrcEnd(mSrcIdx);
mSrcIdx--;
}
else if ((mSyntaxToken == BfSyntaxToken_EOF) || (mSyntaxToken == BfSyntaxToken_StringQuote))
else if (mSyntaxToken == BfSyntaxToken_StringQuote)
{
mSrcIdx--;
mPassInstance->FailAfterAt("Expected '}'", mSourceData, newBlock->GetSrcEnd() - 1);