diff options
Diffstat (limited to 'eurephiadm')
-rw-r--r-- | eurephiadm/argparser.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/eurephiadm/argparser.c b/eurephiadm/argparser.c index 8860103..bc635e8 100644 --- a/eurephiadm/argparser.c +++ b/eurephiadm/argparser.c @@ -31,6 +31,10 @@ int _eurephia_getopt(const char *module, int curarg, int argc, char **argv, e_op int i = 0; char *arg = argv[curarg]; + if( arg == NULL ) { + return -1; + } + for( i = 0; argopts[i].longarg != NULL; i++ ) { if( (strcmp(argopts[i].longarg, arg) == 0) || (strcmp(argopts[i].shortarg, arg) == 0) ) |