diff options
Diffstat (limited to 'pwgen.c')
| -rw-r--r-- | pwgen.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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]); |