Skip to content

A Hardware Hacking Tool with Web-Based CLI That Speaks Every Protocol

move vector alloc in guide shell

Geodb8990b73fa6
diff --git a/src/Shells/GuideShell.cpp b/src/Shells/GuideShell.cpp
index 965bd784..fd298936 100644
--- a/src/Shells/GuideShell.cpp
+++ b/src/Shells/GuideShell.cpp
@@ -13,11 +13,13 @@ GuideShell::GuideShell(ITerminalView& tv,
void GuideShell::run() {
bool loop = true;
+ std::vector<std::string> actionsVector(actions, actions + actionsCount);
+
while (loop) {
terminalView.println("\n=== Guide Shell ===");
int choice = userInputManager.readValidatedChoiceIndex(
"Select a topic:",
- std::vector<std::string>(actions, actions + actionsCount),
+ actionsVector,
static_cast<int>(actionsCount) - 1
);