diff --git a/include/ircd/json.h b/include/ircd/json.h index 0081655d4..0f8ec9a12 100644 --- a/include/ircd/json.h +++ b/include/ircd/json.h @@ -167,7 +167,8 @@ ircd::json::string(T&&... t) serialized(std::forward(t)...) }; - std::string ret(size, char{}); + std::string ret; + ret.resize(size, char{}); const auto buf{const_cast(ret.data())}; const auto max{ret.size() + 1};