about summary refs log tree commit diff
path: root/src/misc/getopt_long.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc/getopt_long.c')
-rw-r--r--src/misc/getopt_long.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/misc/getopt_long.c b/src/misc/getopt_long.c
index 0d1501d4..008b747c 100644
--- a/src/misc/getopt_long.c
+++ b/src/misc/getopt_long.c
@@ -63,7 +63,8 @@ static int __getopt_long_core(int argc, char *const *argv, const char *optstring
 			const char *name = longopts[i].name;
 			opt = argv[optind]+1;
 			if (*opt == '-') opt++;
-			for (; *name && *name == *opt; name++, opt++);
+			while (*opt && *opt != '=' && *opt == *name)
+				name++, opt++;
 			if (*opt && *opt != '=') continue;
 			arg = opt;
 			match = i;