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:
commit
3efa83a7a0
1 changed files with 2 additions and 2 deletions
|
@ -2146,7 +2146,7 @@ void BfParser::NextToken(int endIdx, bool outerIsInterpolate, bool disablePrepro
|
||||||
newBlock->SetSrcEnd(mSrcIdx);
|
newBlock->SetSrcEnd(mSrcIdx);
|
||||||
mSrcIdx--;
|
mSrcIdx--;
|
||||||
}
|
}
|
||||||
else if ((mSyntaxToken == BfSyntaxToken_EOF) || (mSyntaxToken == BfSyntaxToken_StringQuote))
|
else if (mSyntaxToken == BfSyntaxToken_StringQuote)
|
||||||
{
|
{
|
||||||
mSrcIdx--;
|
mSrcIdx--;
|
||||||
mPassInstance->FailAfterAt("Expected '}'", mSourceData, newBlock->GetSrcEnd() - 1);
|
mPassInstance->FailAfterAt("Expected '}'", mSourceData, newBlock->GetSrcEnd() - 1);
|
||||||
|
@ -4205,4 +4205,4 @@ BF_EXPORT void BF_CALLTYPE BfParser_GetLineCharAtIdx(BfParser* bfParser, int idx
|
||||||
BF_EXPORT int BF_CALLTYPE BfParser_GetIndexAtLine(BfParser* bfParser, int line)
|
BF_EXPORT int BF_CALLTYPE BfParser_GetIndexAtLine(BfParser* bfParser, int line)
|
||||||
{
|
{
|
||||||
return bfParser->GetIndexAtLine(line);
|
return bfParser->GetIndexAtLine(line);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue