From fe1c21d04d4f2bc1c231ff8f73648b81425b58db Mon Sep 17 00:00:00 2001 From: Maksim Zholudev Date: Thu, 3 Nov 2011 18:09:32 +0100 Subject: [PATCH] Fix issue 6888. --- std/getopt.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/std/getopt.d b/std/getopt.d index 0877f7c1f..1f16d8ce0 100644 --- a/std/getopt.d +++ b/std/getopt.d @@ -461,7 +461,7 @@ void handleOption(R)(string option, R receiver, ref string[] args, enum isDelegateWithLessThanTwoParameters = is(typeof(receiver) == delegate) && !is(typeof(receiver("", ""))); - if (!isDelegateWithLessThanTwoParameters && !val && !incremental) { + if (!isDelegateWithLessThanTwoParameters && !(val.length) && !incremental) { // Eat the next argument too. Check to make sure there's one // to be eaten first, though. enforce(i < args.length,