From 9af1e5af4ee073804a75d0c3658826391eb024fd Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 10 Jul 2019 06:51:23 -0700 Subject: [PATCH] ircd::m: Fix pretty(event) format when lacking a digest. --- ircd/m_event.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ircd/m_event.cc b/ircd/m_event.cc index a171c4a8c..e7e9c60d8 100644 --- a/ircd/m_event.cc +++ b/ircd/m_event.cc @@ -303,8 +303,11 @@ ircd::m::pretty(std::ostream &s, << " :" << event_id; for(const auto &[algorithm, digest] : ref_hash) - s << " " << unquote(algorithm) - << ": " << unquote(digest); + { + s << " " << unquote(algorithm); + if(digest) + s << ": " << unquote(digest); + } s << std::endl; } @@ -320,8 +323,11 @@ ircd::m::pretty(std::ostream &s, << " :" << event_id; for(const auto &[algorithm, digest] : ref_hash) - s << " " << unquote(algorithm) - << ": " << unquote(digest); + { + s << " " << unquote(algorithm); + if(digest) + s << ": " << unquote(digest); + } s << std::endl; }