Skip to content

Commit

Permalink
Merge pull request #1101 from cortex-engine/master
Browse files Browse the repository at this point in the history
cppia: fix crash on functions with empty bodies
  • Loading branch information
hughsando authored Apr 14, 2024
2 parents 3b18311 + 36804ab commit 7a7a17a
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 7a7a17a

Please sign in to comment.