From 2edafb2504e3b20da6033e4a396636cfe22942f2 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Tue, 12 Sep 2017 21:11:52 +0200 Subject: Change how existance of strings in info-structs are checked. Before this commit they always evaluated as true. Fixes #568. --- src/PJ_cart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/PJ_cart.c b/src/PJ_cart.c index 1373e870..257d0dca 100644 --- a/src/PJ_cart.c +++ b/src/PJ_cart.c @@ -486,13 +486,13 @@ int pj_cart_selftest (void) { /* proj_info() */ /* this one is difficult to test, since the output changes with the setup */ info = proj_info(); - if (info.version) { + if (info.version[0] != '\0' ) { char tmpstr[64]; sprintf(tmpstr, "%d.%d.%d", info.major, info.minor, info.patch); if (strcmp(info.version, tmpstr)) return 55; } - if (!info.release) return 56; - if (!info.searchpath) return 57; + if (info.release[0] == '\0') return 56; + if (info.searchpath[0] == '\0') return 57; /* proj_pj_info() */ P = proj_create(0, "+proj=august"); /* august has no inverse */ -- cgit v1.2.3