File: args.patch

package info (click to toggle)
otf2bdf 3.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 460 kB
  • sloc: ansic: 1,233; makefile: 39; sh: 23
file content (15 lines) | stat: -rw-r--r-- 602 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Index: otf2bdf-3.1/otf2bdf.c
===================================================================
--- otf2bdf-3.1.orig/otf2bdf.c
+++ otf2bdf-3.1/otf2bdf.c
@@ -1283,6 +1283,10 @@ main(int argc, char *argv[])
 
     while (argc > 0) {
         if (argv[0][0] == '-') {
+          if (strchr("lLcCtTwWsSkKdDfFuUpPeErRmMoO", argv[0][1]) && (argc < 2 || !argv[1])) {
+            fprintf(stderr, "%s: command line argument %s requires a parameter.\n", prog, argv[0]);
+            exit(1);
+          } else
             switch (argv[0][1]) {
               case 'v': case 'V':
                 verbose = 1;