--- a/pwgen.c
+++ b/pwgen.c
@@ -138,7 +138,7 @@ int main(int argc, char **argv)
 			break;
 		case 's':
 			pwgen = pw_rand;
-			pwgen_flags = PW_DIGITS | PW_UPPERS;
+			pwgen_flags |= PW_DIGITS | PW_UPPERS;
 			break;
 		case 'C':
 			do_columns = 1;