summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hurst <jhurst@cinecert.com>2023-04-25 07:33:15 -0700
committerGitHub <noreply@github.com>2023-04-25 07:33:15 -0700
commitc0a721e40ed15d12a1ecfe67f465776e454be91d (patch)
tree5f0809cf1b0d77ec7bf0562acbf524397aaa4e44 /src
parentcc9db7bcf94f14f0d8158d120bc3ce502bfaf660 (diff)
parent78f8a623de5a03b361c6c7df8d6e85a67763e503 (diff)
Merge pull request #117 from msheby/feature/allow-mos
feature: allow an MCA label to start with a hyphen
Diffstat (limited to 'src')
-rwxr-xr-xsrc/asdcp-wrap.cpp8
1 files changed, 7 insertions, 1 deletions
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;