From f6085cae15588228695eba6f7e0c2a490641bff9 Mon Sep 17 00:00:00 2001 From: Philipp Klaus Date: Tue, 21 Jun 2011 17:12:22 +0200 Subject: automatic commit for pwgen-2.05 --- pwgen.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pwgen.c') diff --git a/pwgen.c b/pwgen.c index 3af933b..a371f92 100644 --- a/pwgen.c +++ b/pwgen.c @@ -158,6 +158,10 @@ int main(int argc, char **argv) pw_length = strtol(argv[optind], &tmp, 0); if (pw_length < 5) pwgen = pw_rand; + if (pw_length <= 2) + pwgen_flags &= ~PW_UPPERS; + if (pw_length <= 1) + pwgen_flags &= ~PW_DIGITS; if (*tmp) { fprintf(stderr, "Invalid password length: %s\n", argv[optind]); -- cgit v1.2.3