[Crash] World CLI validation (#4728)

* [Crash] World CLI validation

* Clean
This commit is contained in:
Chris Miles
2025-03-01 17:52:51 -06:00
committed by GitHub
parent acb7584e26
commit 23c4aa241b
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -101,6 +101,13 @@ bool WorldBoot::HandleCommandInput(int argc, char **argv)
}
}
// check if we ran a valid command, this whole CLI handler needs to be improved at a later time
std::string arg1 = argc >= 2 ? argv[1] : "";
if (argc >= 2 && !Strings::Contains(arg1, ":")) {
std::cout << "Invalid command, use --help to see available commands" << std::endl;
return true;
}
return false;
}