From 81df68d8aa1ad9d9bb50f7266b231ec44cd36885 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Thu, 4 Jan 2018 14:54:41 +0100 Subject: Avoid overwriting time component with zero --- src/PJ_unitconvert.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/PJ_unitconvert.c b/src/PJ_unitconvert.c index 106caabf..9cd2acf8 100644 --- a/src/PJ_unitconvert.c +++ b/src/PJ_unitconvert.c @@ -347,7 +347,7 @@ static PJ_COORD forward_4d(PJ_COORD obs, PJ *P) { Forward conversion of time units ************************************************************************/ struct pj_opaque_unitconvert *Q = (struct pj_opaque_unitconvert *) P->opaque; - PJ_COORD out = {{0,0,0,0}}; + PJ_COORD out = obs; /* delegate unit conversion of physical dimensions to the 3D function */ out.xyz = forward_3d(obs.lpz, P); @@ -367,7 +367,7 @@ static PJ_COORD reverse_4d(PJ_COORD obs, PJ *P) { Reverse conversion of time units ************************************************************************/ struct pj_opaque_unitconvert *Q = (struct pj_opaque_unitconvert *) P->opaque; - PJ_COORD out = {{0,0,0,0}}; + PJ_COORD out = obs; /* delegate unit conversion of physical dimensions to the 3D function */ out.lpz = reverse_3d(obs.xyz, P); -- cgit v1.2.3