about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-02-07 15:27:31 +0100
committervanhauser-thc <vh@thc.org>2023-02-07 15:27:31 +0100
commit03e6d33a4044115c44afeb6c1ae735c0310018af (patch)
tree75faf3283fd6ca9adc85a085d82daba53ea2c26b /src
parent6596284cc41484ec5062ca53109ec5bd7899e56f (diff)
downloadafl++-03e6d33a4044115c44afeb6c1ae735c0310018af.tar.gz
fix perfscore 0 check
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index 748c7acf..8c2eb5b7 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -2559,8 +2559,8 @@ int main(int argc, char **argv_orig, char **envp) {
             u32 found = 0;
             for (u32 i = 0; i < afl->queued_items; ++i) {
 
-              if (likely(afl->queue_buf[i]->disabled &&
-                         !afl->queue_buf[i]->perf_score)) {
+              if (likely(!afl->queue_buf[i]->disabled &&
+                         afl->queue_buf[i]->perf_score == 0)) {
 
                 ++found;
 
@@ -2573,7 +2573,7 @@ int main(int argc, char **argv_orig, char **envp) {
               // all active items have a perf_score of 0 ... damn
               for (u32 i = 0; i < afl->queued_items; ++i) {
 
-                if (likely(afl->queue_buf[i]->disabled)) {
+                if (likely(!afl->queue_buf[i]->disabled)) {
 
                   afl->queue_buf[i]->perf_score = afl->queue_buf[i]->weight;