summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dijkstra.cpp1
-rw-r--r--src/wall-atlas.hpp2
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{};