Skip to content

Commit

Permalink
Fixed error when using optimize compare without -r
Browse files Browse the repository at this point in the history
  • Loading branch information
0xVavaldi committed Feb 6, 2024
1 parent 9afca73 commit 656bf25
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,12 @@ int main(int argc, const char *argv[]) {
return 1;
}

if(!(optimize_no_op || optimize_same_op || optimize_similar_op || !compare_rules.empty()) && (input_wordlist.empty() || input_rules.empty())) {
if((input_wordlist.empty() || input_rules.empty()) && !(optimize_no_op || optimize_same_op || optimize_similar_op || !compare_rules.empty())) {
show_usage();
return 1;
}

if(!compare_rules.empty() && input_rules.empty()) {
show_usage();
return 1;
}
Expand Down Expand Up @@ -1474,7 +1479,7 @@ int main(int argc, const char *argv[]) {

queue_buffer.emplace_back(rule_set_pair);
if (queue_buffer.size() > 10) {
std::unique_lock<std::mutex> lock(lock_obj); // push to queue
std::unique_lock<std::mutex> lock(lock_obj); // push to queuedd
rule_queue.push(queue_buffer);
lock.unlock();

Expand Down

0 comments on commit 656bf25

Please sign in to comment.