Skip to content

Commit 16d7e98

Browse files
committed
typo: missing parts.size() test for 'plug' without arguments. use std::ranges::end() iterator.
1 parent c454de1 commit 16d7e98

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

library/Core.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ command_result Core::runCommand(color_ostream &con, const std::string &first_, s
895895

896896
con.print(
897897
"%21s %-3s%s\n",
898-
(plug->getName()+":").c_str(),
898+
(key+":").c_str(),
899899
plug->is_enabled() ? "on" : "off",
900900
plug->can_set_enabled() ? "" : " (controlled internally)"
901901
);
@@ -920,7 +920,7 @@ command_result Core::runCommand(color_ostream &con, const std::string &first_, s
920920
if (!plug)
921921
continue;
922922

923-
if (std::ranges::find(parts, plug->getName()) == parts.end())
923+
if (parts.size() && std::ranges::find(parts, key) == std::ranges::end(parts))
924924
continue;
925925

926926
color_value color;

0 commit comments

Comments
 (0)