From 3a64658eafba67186103caeb101d279d77976992 Mon Sep 17 00:00:00 2001 From: angt Date: Mon, 9 Nov 2015 08:58:57 +0100 Subject: [PATCH] Do not allow the same option multiple times --- option.c | 10 ++++++++++ option.h | 1 + 2 files changed, 11 insertions(+) diff --git a/option.c b/option.c index ee2df6a..5e5688c 100644 --- a/option.c +++ b/option.c @@ -50,6 +50,9 @@ int option_option (void *data, int argc, char **argv) { struct option *opts = (struct option *)data; + for (int k=0; opts[k].name; k++) + opts[k].set = 0; + for (int i=1; i