From ed637d48f09ebe68a86166a966b29483436d180d Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 11 Apr 2018 18:43:45 -0700 Subject: [PATCH] ircd::m::dbs: Fix issues with origins index key split. --- ircd/m/dbs.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ircd/m/dbs.cc b/ircd/m/dbs.cc index dd722ec21..357c19349 100644 --- a/ircd/m/dbs.cc +++ b/ircd/m/dbs.cc @@ -701,7 +701,9 @@ ircd::m::dbs::room_origins_key(const string_view &amalgam) return { { s.first }, - { end(s.first), end(s.second) } + !empty(s.second)? + string_view{begin(s.second) - 1, end(s.second)}: + string_view{} }; }