1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Hardening against errors during build fails

This commit is contained in:
Brian Fiete 2025-01-24 12:54:58 -08:00
parent ac7f66c1f1
commit 9444a0d936
2 changed files with 28 additions and 12 deletions

View file

@ -10353,6 +10353,10 @@ BF_EXPORT const char* BF_CALLTYPE BfCompiler_GetCollapseRegions(BfCompiler* bfCo
emitParser->GetLineCharAtIdx(kv.mValue.mSrcStart, startLine, startLineChar);
int srcEnd = kv.mValue.mSrcEnd - 1;
if (srcEnd >= emitParser->mOrigSrcLength)
continue;
while (srcEnd >= kv.mValue.mSrcStart)
{
char c = emitParser->mSrc[srcEnd];