Fix previous.
authorCarl Hetherington <cth@carlh.net>
Tue, 3 Feb 2015 09:58:51 +0000 (09:58 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 3 Feb 2015 09:58:51 +0000 (09:58 +0000)
tools/dcpdiff.cc

index 08b727106dcdb46aadca7e6eb7ff80755532fd78..30c09f872ee352deea99b28e0f88ccc21c7d448b 100644 (file)
@@ -114,11 +114,11 @@ main (int argc, char* argv[])
                        /* From here we're using random capital letters for the short option */
                        { "ignore-missing-assets", no_argument, 0, 'A'},
                        { "cpl-annotation-texts", no_argument, 0, 'C'},
-                       { "key", no_argument, 0, 'D'},
+                       { "key", required_argument, 0, 'D'},
                        { 0, 0, 0, 0 }
                };
 
-               int c = getopt_long (argc, argv, "Vhvnm:s:kACD", long_options, &option_index);
+               int c = getopt_long (argc, argv, "Vhvnm:s:kACD:", long_options, &option_index);
 
                if (c == -1) {
                        break;
@@ -154,7 +154,7 @@ main (int argc, char* argv[])
                        options.cpl_annotation_texts_can_differ = true;
                        break;
                case 'D':
-                       key = optarg;
+                       key = string (optarg);
                        break;
                }
        }