Skip to content

Commit 4e8beb0

Browse files
committed
Reset tools when empty string provided
1 parent cd16957 commit 4e8beb0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

common/common.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,6 +1775,10 @@ common_params_tools::common_params_tools(std::string tools, std::string choice)
17751775
}
17761776

17771777
void common_params_tools::tools(std::string tools) {
1778+
if (tools.empty()) {
1779+
tools_.reset();
1780+
return;
1781+
}
17781782
try {
17791783
tools_ = std::make_shared<json>(json::parse(tools));
17801784
if (! tools_->is_array()) {

0 commit comments

Comments
 (0)