diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2017-09-09 11:16:40 +0200 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2017-09-09 11:16:40 +0200 |
| commit | 5e97ef560034cb0ae2aec9613a5ff7695b1704c5 (patch) | |
| tree | 899cde685dfb80d265e42965fd7325720b52f783 /src | |
| parent | e044eb01eefb29187379c694f5d51d91360d3143 (diff) | |
| download | PROJ-5e97ef560034cb0ae2aec9613a5ff7695b1704c5.tar.gz PROJ-5e97ef560034cb0ae2aec9613a5ff7695b1704c5.zip | |
Tested for wrong indices before array lookup. Fixes #566.
Diffstat (limited to 'src')
| -rw-r--r-- | src/PJ_unitconvert.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/PJ_unitconvert.c b/src/PJ_unitconvert.c index 27672c8d..49bb6556 100644 --- a/src/PJ_unitconvert.c +++ b/src/PJ_unitconvert.c @@ -309,9 +309,9 @@ static PJ_OBS reverse_obs(PJ_OBS obs, PJ *P) { /* delegate unit conversion of physical dimensions to the 3D function */ out.coo.lpz = reverse_3d(obs.coo.xyz, P); - if (Q->t_in_id >= 0) - out.coo.xyzt.t = time_units[Q->t_out_id].t_in( obs.coo.xyzt.t ); if (Q->t_out_id >= 0) + out.coo.xyzt.t = time_units[Q->t_out_id].t_in( obs.coo.xyzt.t ); + if (Q->t_in_id >= 0) out.coo.xyzt.t = time_units[Q->t_in_id].t_out( out.coo.xyzt.t ); return out; |
