From 42a20bcc41f3c24f651371a9dc2541282ed33724 Mon Sep 17 00:00:00 2001 From: sha512sum Date: Mon, 8 Jul 2024 02:43:21 +0000 Subject: [PATCH] Fix bug in cli manager --- include/cserver/components/cli/manager.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/cserver/components/cli/manager.hpp b/include/cserver/components/cli/manager.hpp index 7680d63..23a1c1f 100644 --- a/include/cserver/components/cli/manager.hpp +++ b/include/cserver/components/cli/manager.hpp @@ -74,6 +74,7 @@ struct Manager { constexpr std::string_view nname = nnname.substr(0, nnname.find(',')); utempl::ConstexprString name; std::ranges::copy_n(nname.begin(), nname.size(), name.begin()); + name.data[nname.size()] = '\0'; if(this->variableMap.count(name.begin())) { return this->variableMap[name.begin()].template as(); };