From 651c97aa54c9a6a0d6b2000d3cf66b95cc4c10a5 Mon Sep 17 00:00:00 2001 From: alef Date: Sat, 13 Jan 2024 11:23:20 +0100 Subject: [PATCH 1/2] #70432 Do not walk before vector's begin() --- src/magic_spell_effect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/magic_spell_effect.cpp b/src/magic_spell_effect.cpp index b09c4b5ea0daf..524f17fbda56c 100644 --- a/src/magic_spell_effect.cpp +++ b/src/magic_spell_effect.cpp @@ -1686,7 +1686,7 @@ void spell_effect::dash( const spell &sp, Creature &caster, const tripoint &targ --walk_point; } break; - } else { + } else if ( walk_point != trajectory.begin() ) { sp.create_field( here.getlocal( *( walk_point - 1 ) ), caster ); g->draw_ter(); } From 3ee6ac780b88a654a9cfce996dd77c33471d936c Mon Sep 17 00:00:00 2001 From: alef Date: Sat, 13 Jan 2024 11:30:09 +0100 Subject: [PATCH 2/2] Obey astyle --- src/magic_spell_effect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/magic_spell_effect.cpp b/src/magic_spell_effect.cpp index 524f17fbda56c..4422ce0f7234e 100644 --- a/src/magic_spell_effect.cpp +++ b/src/magic_spell_effect.cpp @@ -1686,7 +1686,7 @@ void spell_effect::dash( const spell &sp, Creature &caster, const tripoint &targ --walk_point; } break; - } else if ( walk_point != trajectory.begin() ) { + } else if( walk_point != trajectory.begin() ) { sp.create_field( here.getlocal( *( walk_point - 1 ) ), caster ); g->draw_ter(); }