From 78f8a623de5a03b361c6c7df8d6e85a67763e503 Mon Sep 17 00:00:00 2001 From: Matthew Sheby <44249925+msheby@users.noreply.github.com> Date: Thu, 9 Feb 2023 17:35:16 -0800 Subject: feature: allow an MCA label to start with a hyphen --- src/asdcp-wrap.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/asdcp-wrap.cpp') diff --git a/src/asdcp-wrap.cpp b/src/asdcp-wrap.cpp index 7715b77..fa75ede 100755 --- a/src/asdcp-wrap.cpp +++ b/src/asdcp-wrap.cpp @@ -105,6 +105,12 @@ public: return; \ } +#define TEST_EXTRA_ARG_ALLOW_DASH(i,c) \ + if ( ++i >= argc ) { \ + fprintf(stderr, "Argument not found for option -%c.\n", (c)); \ + return; \ + } + // static void @@ -443,7 +449,7 @@ public: case 'M': write_hmac = false; break; case 'm': - TEST_MCA_EXTRA_ARG(i, 'm'); + TEST_EXTRA_ARG_ALLOW_DASH(i, 'm'); mca_config_str = argv[i]; break; -- cgit v1.2.3