Commit ca777cd8 authored by Mathieu Valois's avatar Mathieu Valois
Browse files

simplify regex check

parent 87755480
Loading
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -324,7 +324,9 @@ void updateMinMax(minMax& m, const Policy& pol) {

void handle_password(const string& password, const uint64_t& nbPasswords, thread_data* my_data){
	my_data->total_counter += nbPasswords;
	if ( !my_data->use_regex || regex_match(password,my_data->current_regex)) {
	if(my_data->use_regex && !regex_match(password,my_data->current_regex)){
		return;
	}
	PasswordStats c = analyze_password(password, my_data->sr,my_data->limitAdvancedmask, my_data->limitSimplemask);
	my_data->total_filter += nbPasswords;
	my_data->length[ c.pass_length ] += nbPasswords;
@@ -333,7 +335,6 @@ void handle_password(const string& password, const uint64_t& nbPasswords, thread
	my_data->advancedmasks[ c.advancedmask_string ] += nbPasswords;
	updateMinMax(my_data->minMaxValue, c.pol);
}
}

void* generate_stats_thread_queue(void* threadarg) {
	struct thread_data *my_data = (struct thread_data *) threadarg;