diff --git a/ircd/m_room.cc b/ircd/m_room.cc index 5fc7922a3..38d1dbd38 100644 --- a/ircd/m_room.cc +++ b/ircd/m_room.cc @@ -2830,10 +2830,15 @@ ircd::m::room::state::space::for_each(const string_view &type, const closure &closure) const { + const int64_t &_depth + { + type? depth : 0L + }; + char buf[dbs::ROOM_STATE_SPACE_KEY_MAX_SIZE]; const string_view &key { - dbs::room_state_space_key(buf, room.room_id, type, state_key, depth, 0UL) + dbs::room_state_space_key(buf, room.room_id, type, state_key, _depth, 0UL) }; auto it