database: Fix checking pointer
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 19 Oct 2019 10:53:34 +0000 (11:53 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 19 Oct 2019 10:53:34 +0000 (11:53 +0100)
This always evaluated to true which is not what was intended here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/database.c

index 3439b15..5d808fe 100644 (file)
@@ -921,7 +921,7 @@ LOC_EXPORT int loc_database_enumerator_next_network(
                        // Check if we are interested in this network
 
                        // Skip if the country code does not match
-                       if (enumerator->country_code &&
+                       if (*enumerator->country_code &&
                                        !loc_network_match_country_code(*network, enumerator->country_code)) {
                                loc_network_unref(*network);
                                *network = NULL;