Skip to content

Commit

Permalink
add size-check for expressions vector in runVoid
Browse files Browse the repository at this point in the history
  • Loading branch information
dazKind committed Apr 13, 2024
1 parent 3b18311 commit 36804ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hx/cppia/Cppia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,8 @@ struct BlockExpr : public CppiaExpr
BlockExprRun(hx::Object *,runObject,0)
void runVoid(CppiaCtx *ctx)
{
if (expressions.size()==0)
return;
CppiaExpr **e = &expressions[0];
CppiaExpr **end = e+expressions.size();
for(;e<end && !ctx->breakContReturn;e++)
Expand Down

0 comments on commit 36804ab

Please sign in to comment.