diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-22 01:37:00 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-22 04:17:20 +0100 |
commit | 7edff9213893164ab14580791a4172eb13c9614a (patch) | |
tree | 807a91d908c3df1f2808482154e707d21fe42b11 /editor | |
parent | 5f1de5633a9b53f12bf9c0923c790a3d8f0c96d7 (diff) |
fix oob write due to typo
Stack-use-after-return on address 0x1272255d6ad0 at pc 0x7ff7069e08a0 bp 0x00539fd7e4e0 sp 0x00539fd7e528
WRITE of size 1 at 0x1272255d6ad0 thread T0
at 0x7ff7069e089f floormat::tests::(anonymous namespace)::next_stepʹ(Magnum::Math::Vector2<int>) (pathfinding.cpp:53)
at 0x7ff7069dff1b floormat::tests::(anonymous namespace)::next_step(floormat::point, floormat::point) (pathfinding.cpp:89)
at 0x7ff7069deaad floormat::tests::(anonymous namespace)::pf_test::update_pre(floormat::app&, floormat::Ns const&) (pathfinding.cpp:238)
at 0x7ff7069cc1a1 floormat::app::tests_pre_update(floormat::Ns) (tests.cpp:52)
at 0x7ff7069fd776 floormat::app::update(floormat::Ns) (update.cpp:280)
at 0x7ff706a26b0b floormat::main_impl::do_update() (draw.cpp:45)
at 0x7ff706a26f69 floormat::main_impl::drawEvent() (draw.cpp:63)
at 0x7ff707658ca4 Magnum::Platform::Sdl2Application::mainLoopIteration() (Sdl2Application.cpp:1036)
at 0x7ff7076564af Magnum::Platform::Sdl2Application::exec() (Sdl2Application.cpp:867)
at 0x7ff706a2f084 floormat::main_impl::exec() (main-impl.cpp:21)
at 0x7ff7067a29d7 floormat::app::exec() (app.cpp:62)
at 0x7ff7067a62f6 floormat::app::run_from_argv(int, char const* const*) (app.cpp:148)
at 0x7ff7067a66e4 main (app.cpp:162)
at 0x7ff7067a1310 __tmainCRTStartup (crtexe.c:267)
at 0x7ff7067a1365 .l_start (crtexe.c:188)
at 0x7fff5bac7343
at 0x7fff5ca026b0
Address 0x1272255d6ad0 is located in stack of thread T0 at offset 208 in frame
at 0x7ff706a3248f floormat::main_impl::pixel_to_tile(Magnum::Math::Vector2<double>) const (projection.cpp:9)
Diffstat (limited to 'editor')
-rw-r--r-- | editor/tests/pathfinding.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/tests/pathfinding.cpp b/editor/tests/pathfinding.cpp index 928d7496..b33a71c0 100644 --- a/editor/tests/pathfinding.cpp +++ b/editor/tests/pathfinding.cpp @@ -50,7 +50,7 @@ constexpr step_s next_stepʹ(Vector2i vec_in) const auto major = vec[major_idx], minor = vec[minor_idx]; const auto num_axis_aligned = (uint32_t)Math::abs((int)major - (int)minor); auto axis_aligned = Vector2b{}; - axis_aligned[major] = 1; + axis_aligned[major_idx] = 1; return { num_axis_aligned, axis_aligned * signs }; } } |