0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-29 08:54:02 +01:00

ircd::json: Fix error.

This commit is contained in:
Jason Volk 2017-10-03 13:20:43 -07:00
parent fccfa03308
commit fb498ed2f2

View file

@ -167,7 +167,8 @@ ircd::json::string(T&&... t)
serialized(std::forward<T>(t)...)
};
std::string ret(size, char{});
std::string ret;
ret.resize(size, char{});
const auto buf{const_cast<char *>(ret.data())};
const auto max{ret.size() + 1};