0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-03 09:18:19 +02:00

ircd::util: Assert the stream didn't overflow our buffer.

This commit is contained in:
Jason Volk 2018-04-06 22:35:14 -07:00
parent 048ecf07bb
commit 05fcdd458a

View file

@ -270,10 +270,13 @@ view(stringstream &ss,
assert(size_t(ss.tellp()) <= size(buf));
ss.flush();
ss.rdbuf()->pubsync();
return
const string_view ret
{
data(buf), size_t(ss.tellp())
};
assert(size(ret) <= size(buf));
return ret;
}
//