gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 157/164: Fixed one more bug ;-)


From: gnunet
Subject: [gnunet] 157/164: Fixed one more bug ;-)
Date: Fri, 30 Jul 2021 15:33:43 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

commit feff89e4f0424969cf84ae359242e05a783e9061
Author: Elias Summermatter <elias.summermatter@seccom.ch>
AuthorDate: Mon Jun 14 16:08:23 2021 +0200

    Fixed one more bug ;-)
---
 src/setu/ibf.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/setu/ibf.c b/src/setu/ibf.c
index a0934464f..c72d075e0 100644
--- a/src/setu/ibf.c
+++ b/src/setu/ibf.c
@@ -404,7 +404,6 @@ pack_counter (const struct InvertibleBloomFilter *ibf,
         count_val_to_write = count_val_to_write & ((1ULL <<
                                                     count_len_to_write) - 1);
 
-
         store = 0;
         store_size = 0;
       }
@@ -429,9 +428,10 @@ pack_counter (const struct InvertibleBloomFilter *ibf,
     }
     i++;
   }
-
-  buf[byte_ctr] = store << (8 - store_size);
-  byte_ctr++;
+  if(store_size > 0) {
+      buf[byte_ctr] = store << (8 - store_size);
+      byte_ctr++;
+  }
 
 }
 
@@ -480,17 +480,12 @@ unpack_counter (const struct InvertibleBloomFilter *ibf,
         uint8_t bytes_to_shift = bit_to_read_left - bytes_used;
         uint64_t counter_part = byte_read >> bytes_to_shift;
         store = store | counter_part;
-        ibf->count[ibf_counter_ctr].count_val = store;
-
+        ibf->count[ibf_counter_ctr + start].count_val = store;
         byte_read = byte_read & ((1 << bytes_to_shift) - 1);
-
-
         bit_to_read_left -= bytes_used;
         ibf_counter_ctr++;
         store = 0;
         store_bit_ctr = 0;
-
-
       }
       else
       {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]