From 5f3d184276f6b4e13642018681cf33d2bc5b7638 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 27 Nov 2023 05:57:05 +0100 Subject: a --- src/dijkstra.cpp | 1 + src/wall-atlas.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/dijkstra.cpp b/src/dijkstra.cpp index c5efbd34..8dd8d97a 100644 --- a/src/dijkstra.cpp +++ b/src/dijkstra.cpp @@ -346,6 +346,7 @@ path_search_result astar::Dijkstra(world& w, const point from, const point to, } if (len) { + len = Math::min(len, std::size(buf)-1); std::fwrite(buf, len, 1, stdout); std::fflush(stdout); } diff --git a/src/wall-atlas.hpp b/src/wall-atlas.hpp index 8afddc24..333dd47c 100644 --- a/src/wall-atlas.hpp +++ b/src/wall-atlas.hpp @@ -44,7 +44,7 @@ enum class Direction_ : uint8_t { N, E, S, W, COUNT }; struct Direction { using memfn_ptr = Group Direction::*; - struct member_tuple { StringView str; memfn_ptr member; Group_ tag; }; + struct member_tuple { StringView name; memfn_ptr member; Group_ tag; }; Group wall{}, overlay{}, side{}, top{}; Group corner_L{}, corner_R{}; -- cgit v1.2.3