Skip to content

Commit

Permalink
Correctly clean up VectorBool optional arguments in chip-tool. (#22414)
Browse files Browse the repository at this point in the history
We were not actually resetting the Optional (and in fact were operating on
totally the wrong type, and it's not clear why this was not crashing all the
time).

Fixes #22406
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Sep 8, 2022
1 parent 830cd17 commit 870d3c8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/chip-tool/commands/common/Command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -898,8 +898,7 @@ void Command::ResetArguments()
break;
}
case ArgumentType::VectorBool: {
auto vectorArgument = static_cast<std::vector<bool> *>(arg.value);
vectorArgument->clear();
ResetOptionalArg<std::vector<bool>>(arg);
break;
}
case ArgumentType::Vector16: {
Expand Down

0 comments on commit 870d3c8

Please sign in to comment.