diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2017-09-12 21:11:52 +0200 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2017-09-13 07:38:22 +0200 |
| commit | 2edafb2504e3b20da6033e4a396636cfe22942f2 (patch) | |
| tree | c2e3c221e87127480dbdc67b949b7ab819020303 /src | |
| parent | 3c58c97d877efeb601a19a698a400116ab569839 (diff) | |
| download | PROJ-2edafb2504e3b20da6033e4a396636cfe22942f2.tar.gz PROJ-2edafb2504e3b20da6033e4a396636cfe22942f2.zip | |
Change how existance of strings in info-structs are checked. Before this commit they always evaluated as true. Fixes #568.
Diffstat (limited to 'src')
| -rw-r--r-- | src/PJ_cart.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 */ |
