From 7905ace2caaa81803555f0a272fb9bc88a90dc0a Mon Sep 17 00:00:00 2001 From: Squirrel Modeller Date: Thu, 9 Apr 2026 15:22:50 +0200 Subject: [PATCH] fix: move action setter outside null guard --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 52ada39..1218b2f 100644 --- a/src/main.c +++ b/src/main.c @@ -448,8 +448,8 @@ static int handle_movement_input(GameState *gs) { if (result == MOVE_RESULT_MOVED) { if (target != NULL) { player_on_move(&gs->player); - action = 1; } + action = 1; } else if (result == MOVE_RESULT_BLOCKED_ENEMY) { target = player_find_enemy_at(gs->enemies, gs->enemy_count, new_x, new_y); player_attack(&gs->player, target);