diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2024-08-09 09:45:06 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-08-11 11:07:54 +0200 |
| commit | 601915244264ed265c1ca1808a6bb2842cab2286 (patch) | |
| tree | 41342904b71a50202b13f4ccf8fd6bb10adc3a06 /editor/vobj-editor.cpp | |
| parent | bb4fb9bc999494e112371e7ecd7702fe9c145059 (diff) | |
editor: fix use after free
Diffstat (limited to 'editor/vobj-editor.cpp')
| -rw-r--r-- | editor/vobj-editor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/vobj-editor.cpp b/editor/vobj-editor.cpp index 6dc8c907..c95af843 100644 --- a/editor/vobj-editor.cpp +++ b/editor/vobj-editor.cpp @@ -48,8 +48,9 @@ void vobj_editor::place_tile(world& w, global_coords pos, const vobj_* x, struct if (!x) { auto [c, t] = w[pos]; +start: const auto& es = c.objects(); -start: while (auto id = a.get_object_colliding_with_cursor()) + while (auto id = a.get_object_colliding_with_cursor()) { for (auto i = (int)(es.size()-1); i >= 0; i--) { |
