HaxeFoundation / hxcpp

Runtime files for c++ backend for haxe
Other
295 stars 184 forks source link

cppia: fix crash on functions with empty bodies #1101

Closed dazKind closed 5 months ago

dazKind commented 5 months ago

Im building a basic game engine around cppia and I ran into an issue where the debug version of the host would crash with the following message: image

In the debugger I see can see that it fails here for methods that have an empty body: image image image

This PR adds a simple size check in runVoid to prevent the element access of an empty expressions vector.