-GArik: fix assertion check
authorChristian Grothoff <christian@grothoff.org>
Sun, 12 Feb 2012 18:23:07 +0000 (18:23 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 12 Feb 2012 18:23:07 +0000 (18:23 +0000)
src/fs/fs_search.c

index 03b4a7dfd181e9ff3b51d887878e953223c6bb37..a163d97effe7b44bac0adad625515c6c99b3cc09 100644 (file)
@@ -421,7 +421,7 @@ process_ksk_result (struct GNUNET_FS_SearchContext *sc,
     GNUNET_CONTAINER_meta_data_merge (sr->meta, meta);
   }
   koff = ent - sc->requests;
-  GNUNET_assert ( (koff >= 0) && (koff < sc->uri->data.ksk.keywordCount));
+  GNUNET_assert ( (ent >= sc->requests) && (koff < sc->uri->data.ksk.keywordCount));
   sr->keyword_bitmap[koff / 8] |= (1 << (koff % 8));
   /* check if mandatory satisfied */
   if (ent->mandatory)