From 0605b7df8c4acd4c4c1fc3367fa068d99db1183f Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 21 May 2019 12:58:53 +1000 Subject: [PATCH] [common] option: allow short options to toggle boolean values --- VERSION | 2 +- common/src/option.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index bd2e69cc..b0e9657b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -a12-196-gce9b94e93d+1 \ No newline at end of file +a12-197-g51ca08719e+1 \ No newline at end of file diff --git a/common/src/option.c b/common/src/option.c index c00633ee..fe344ff0 100644 --- a/common/src/option.c +++ b/common/src/option.c @@ -301,7 +301,7 @@ bool option_parse(int argc, char * argv[]) { if (o->type == OPTION_TYPE_BOOL) { - option_set(o, "yes"); + o->value.x_bool = !o->value.x_bool; continue; } else if (o->type != OPTION_TYPE_CUSTOM)