# HG changeset patch # User Mychaela Falconia # Date 1727207652 0 # Node ID f77a48a01ff05ea6a6d58f02da0c9e100a718fca # Parent e579784e557870b33dff79a8b105781bc96d771d trau-parse command line: parse -r more robustly diff -r e579784e5578 -r f77a48a01ff0 trau-decode/parse-main.c --- a/trau-decode/parse-main.c Tue Sep 24 19:49:45 2024 +0000 +++ b/trau-decode/parse-main.c Tue Sep 24 19:54:12 2024 +0000 @@ -366,6 +366,8 @@ switch (argc) { case 3: + if (argv[1][0] == '-') + goto usage; filename = argv[1]; subslot_arg = argv[2]; include_raw = 0; @@ -373,6 +375,8 @@ case 4: if (strcmp(argv[1], "-r")) goto usage; + if (argv[2][0] == '-') + goto usage; filename = argv[2]; subslot_arg = argv[3]; include_raw = 1;