1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fixed OOB error for CallerExpression

This commit is contained in:
Brian Fiete 2020-12-24 07:34:46 -08:00
parent a20519ee04
commit 73b643d298

View file

@ -6416,7 +6416,7 @@ BfTypedValue BfExprEvaluator::CreateCall(BfAstNode* targetSrc, const BfTypedValu
if (strcmp(globalVar->mName, "#CallerExpression") == 0)
{
int exprIdx = constGep32_2->mIdx1;
if ((exprIdx >= 0) && (exprIdx <= (int)argValues.size()))
if ((exprIdx >= 0) && (exprIdx < (int)argValues.size()))
{
auto expr = argValues[exprIdx].mExpression;
if (expr != NULL)