diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2017-06-22 11:11:44 +0200 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2017-06-22 12:48:51 +0200 |
| commit | 0bcfd26141c717fa7b91b30c831fc59936c155e3 (patch) | |
| tree | d05177832f9e8e210366b9f785a6117cb999be6e | |
| parent | 4cf473f9ba1c90f8c2d2945d85ca6e42466ecf1a (diff) | |
| download | PROJ-0bcfd26141c717fa7b91b30c831fc59936c155e3.tar.gz PROJ-0bcfd26141c717fa7b91b30c831fc59936c155e3.zip | |
Use *pj_get_errno_ref() instead of pj_errno because it seems pj_errno is not set correctly on some versions of VS. Fixes #484.
| -rw-r--r-- | src/proj.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -209,8 +209,10 @@ vprocess(FILE *fid) { dat_xy = pj_fwd(dat_ll, Proj); if (postscale) { dat_xy.u *= fscale; dat_xy.v *= fscale; } } - if (pj_errno) { - emess(-1, pj_strerrno(pj_errno)); + /* For some reason pj_errno does not work as expected in some */ + /* versions of Visual Studio, so using pj_get_errno_ref instead */ + if (*pj_get_errno_ref()) { + emess(-1, pj_strerrno(*pj_get_errno_ref())); continue; } if (!*s && (s > line)) --s; /* assumed we gobbled \n */ |
