diff --git a/src/help.cpp b/src/help.cpp index ad6796bd85353..27b8ee76a30fd 100644 --- a/src/help.cpp +++ b/src/help.cpp @@ -83,9 +83,10 @@ std::string help::get_dir_grid() for( auto dir : movearray ) { std::vector keys = keys_bound_to( dir ); - for( size_t i = 0; i < keys.size(); i++ ) { + for( size_t i = 0; i < 2; i++ ) { movement = string_replace( movement, "<" + action_ident( dir ) + string_format( "_%d>", i ), - string_format( "%s", keys[i] ) ); + i < keys.size() ? string_format( "%s", keys[i] ) + : "?" ); } }