From 36804abc4d7909af3d80a4c376960fdf593b696a Mon Sep 17 00:00:00 2001 From: Michael Bickel Date: Sat, 13 Apr 2024 08:11:39 +0200 Subject: [PATCH] add size-check for expressions vector in runVoid --- src/hx/cppia/Cppia.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hx/cppia/Cppia.cpp b/src/hx/cppia/Cppia.cpp index 4babb8882..406a9640c 100644 --- a/src/hx/cppia/Cppia.cpp +++ b/src/hx/cppia/Cppia.cpp @@ -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(;ebreakContReturn;e++)