From b00dfdf5727f1506b69560fe44a8a613e4855070 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Thu, 17 Oct 2019 10:29:37 -0400
Subject: [PATCH] c wrapper: reverse is_zero value

---
 c/opendht.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/c/opendht.cpp b/c/opendht.cpp
index 6f9770c5..ba453c31 100644
--- a/c/opendht.cpp
+++ b/c/opendht.cpp
@@ -30,7 +30,7 @@ void dht_infohash_get(dht_infohash* h, const uint8_t* dat, size_t dat_size)
 }
 
 bool dht_infohash_is_zero(const dht_infohash* h) {
-    return static_cast<bool>(*reinterpret_cast<const dht::InfoHash*>(h));
+    return !static_cast<bool>(*reinterpret_cast<const dht::InfoHash*>(h));
 }
 
 const char* dht_pkid_print(const dht_pkid* h)
-- 
GitLab