Skip to content

Commit eaa8528

Browse files
committed
Fix values with = being accepted and ignored for short flag options
1 parent 6744c77 commit eaa8528

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/flag.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public class Flag {
104104
return false;
105105
return
106106
(query.startsWith("--") && longName == query[2..$])
107-
|| (query.startsWith("-") && shortName == query[1..2])
107+
|| (query.length == 2 && query.startsWith("-") && shortName == query[1..2])
108108
|| query == longName
109109
|| query == shortName;
110110
}

0 commit comments

Comments
 (0)