RPS: Fix non-int array subscript
authorJulius Bünger <buenger@mytum.de>
Tue, 26 Feb 2019 13:39:04 +0000 (14:39 +0100)
committerJulius Bünger <buenger@mytum.de>
Tue, 26 Feb 2019 13:39:04 +0000 (14:39 +0100)
src/rps/gnunet-service-rps.c

index 8c50cf9d5ad95da884313a623bbbd97f8c442a18..247892ee0c946bf5d702632d479210498fea2448 100644 (file)
@@ -4388,7 +4388,7 @@ do_round (void *cls)
          HISTOGRAM_FILE_SLOTS);
   }
   // FIXME check bounds of histogram
-  sub->push_delta[(CustomPeerMap_size (sub->push_map) -
+  sub->push_delta[(uint32_t) (CustomPeerMap_size (sub->push_map) -
                    (alpha * sub->view_size_est_need)) +
                           (HISTOGRAM_FILE_SLOTS/2)]++;
   if (sub == msub)