This commit is contained in:
Your Name
2025-04-28 22:03:12 +12:00
parent 320fd1f3f0
commit ff43e4122a
3 changed files with 10 additions and 32 deletions

View File

@ -87,6 +87,7 @@ std::string safearg(int argc, char *argv[], int index)
int main(int argc, char* argv[]) {
if (safearg(argc,argv,1) == "hash") return dropshell::hash_demo_raw(safearg(argc,argv,2));
ASSERT_MSG(safearg(argc,argv,1) != "assert", "Hello! Here is an assert.");
try {
// silently attempt to load the config file.
@ -180,8 +181,8 @@ int main(int argc, char* argv[]) {
}
if (cmd == "edit" && argc < 4) {
ASSERT_ALWAYS(argc>=3);
dropshell::edit_server(argv[2]);
ASSERT_MSG(argc>=3, "Error: logic error!");
dropshell::edit_server(safearg(argc,argv,2));
return 0;
}