diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-11-27 05:57:05 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-11-27 05:57:05 +0100 |
commit | 5f3d184276f6b4e13642018681cf33d2bc5b7638 (patch) | |
tree | c6538eb7ef9c6ab0f361337698f7eee4a9ece819 /src | |
parent | 143b205fae27ed433fd7cac0e0ab6f0fa4f8b03b (diff) |
a
Diffstat (limited to 'src')
-rw-r--r-- | src/dijkstra.cpp | 1 | ||||
-rw-r--r-- | src/wall-atlas.hpp | 2 |
2 files changed, 2 insertions, 1 deletions
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{}; |