Skip to content

Commit c3e632b

Browse files
committed
Bugfix: bitcoin-cli: Check length of peer.transport_protocol_type
1 parent 3d255df commit c3e632b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bitcoin-cli.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ class NetinfoRequestHandler : public BaseRequestHandler
551551
peer.is_outbound ? "out" : "in",
552552
ConnectionTypeForNetinfo(peer.conn_type),
553553
peer.network,
554-
peer.transport_protocol_type.starts_with('v') ? peer.transport_protocol_type[1] : ' ',
554+
(peer.transport_protocol_type.size() == 2 && peer.transport_protocol_type[0] == 'v') ? peer.transport_protocol_type[1] : ' ',
555555
PingTimeToString(peer.min_ping),
556556
PingTimeToString(peer.ping),
557557
peer.last_send ? ToString(time_now - peer.last_send) : "",

0 commit comments

Comments
 (0)