0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-28 00:14:07 +01:00

ircd::ctx: Workaround ircd::size() assertion due to begin(buf)=nullptr.

ircd::ctx: Fix error.
This commit is contained in:
Jason Volk 2020-10-15 02:13:28 -07:00
parent 142179e4a5
commit 8d174ea80d

View file

@ -1154,7 +1154,7 @@ ircd::ctx::context::context(const string_view &name,
function func) function func)
:context :context
{ {
name, {nullptr, DEFAULT_STACK_SIZE}, flags, std::move(func) name, mutable_buffer{nullptr, stack_sz}, flags, std::move(func)
} }
{ {
} }
@ -3109,7 +3109,9 @@ noexcept
} }
,max ,max
{ {
ircd::size(buf) //note: ircd::size() asserts because begin(buf) is nullptr, but that's ok
//ircd::size(buf)
size_t(std::distance(begin(buf), end(buf)))
} }
{ {
} }