changeset 173:503f0cb98775

Fix handling of option arguments.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 23 Feb 2015 15:45:12 +0200
parents eb2c073d93b3
children 7d5707438333
files th_args.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/th_args.c	Thu Feb 19 17:03:00 2015 +0200
+++ b/th_args.c	Mon Feb 23 15:45:12 2015 +0200
@@ -67,7 +67,8 @@
                 (*argIndex)++;
                 optArg = argv[*argIndex];
             }
-            else
+            
+            if (optArg == NULL)
             {
                 THERR("Option '%s%s' requires an argument.\n",
                     isLong ? "--" : "-",