0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 11:18:51 +02:00

modules/console: Use dynamic instead of tls buffers here.

This commit is contained in:
Jason Volk 2020-04-21 02:56:10 -07:00
parent 6ec5b464da
commit 48e4316144

View file

@ -1711,7 +1711,11 @@ console_cmd__conf__list(opt &out, const string_view &line)
param.at("prefix", string_view{})
};
thread_local char val[4_KiB];
const unique_mutable_buffer val
{
4_KiB
};
for(const auto &[key, item_p] : conf::items)
{
if(prefix && !startswith(key, prefix))
@ -1772,7 +1776,11 @@ console_cmd__conf__get(opt &out, const string_view &line)
param.at(0)
};
thread_local char val[4_KiB];
const unique_mutable_buffer val
{
4_KiB
};
for(const auto &item : conf::items)
{
if(item.first != key)