aboutsummaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
authorKirill Petrashin <kirill8201@yandex.ru>2026-04-14 18:41:53 +0300
committerKirill Petrashin <kirill8201@yandex.ru>2026-04-14 18:41:53 +0300
commit7f45a02a1383da0f0a0e72d61388e1e07974a6e3 (patch)
tree3fb47afd93c915cf08024aa8013c2ff10d897d93 /map.c
parent5033a3054d26212a57c0cf62007708ff5fb4ecc3 (diff)
downloadastar-7f45a02a1383da0f0a0e72d61388e1e07974a6e3.tar.xz
Fix bug in previous commit
Diffstat (limited to 'map.c')
-rw-r--r--map.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/map.c b/map.c
index 544164e..f6cb840 100644
--- a/map.c
+++ b/map.c
@@ -375,9 +375,12 @@ void draw_map(Map map, size_t width, size_t height, Position start, Position goa
attroff(COLOR_PAIR(PATH_COLOR));
attron(COLOR_PAIR(WALL_TEXT_COLOR));
mvprintw(map_offset_y - 1, map_offset_x, "Path cost: %zu", length);
- if (visited != NULL) {
- mvprintw(height + map_offset_y, map_offset_x, "Visited %zu cells", visited_count(visited, width, height));
- }
+ attroff(COLOR_PAIR(WALL_TEXT_COLOR));
+ }
+
+ if (visited != NULL) {
+ attron(COLOR_PAIR(WALL_TEXT_COLOR));
+ mvprintw(height + map_offset_y, map_offset_x, "Visited %zu cells", visited_count(visited, width, height));
attroff(COLOR_PAIR(WALL_TEXT_COLOR));
}