From 26a6fa864de4a3ab73e5b371fed9a918378587a7 Mon Sep 17 00:00:00 2001 From: curt Date: Sat, 22 Aug 1998 02:01:11 +0000 Subject: [PATCH] Nailed a uninitialized variable usage bug that was killing us on some platforms with some compiler options. --- Astro/planets.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Astro/planets.cxx b/Astro/planets.cxx index 1fa7ce1b..8dec3021 100644 --- a/Astro/planets.cxx +++ b/Astro/planets.cxx @@ -50,7 +50,7 @@ void fgCalculatePlanet(struct OrbElements planet, struct OrbElements theSun, { // struct CelestialCoord result; - fgSUNPOS SolarPosition; + // fgSUNPOS SolarPosition; double eccAnom, r, v, ecl, actTime, R, s, ir, Nr, B, FV, ring_magn, xv, yv, xh, yh, zh, xg, yg, zg, xe, ye, ze; @@ -90,7 +90,7 @@ void fgCalculatePlanet(struct OrbElements planet, struct OrbElements theSun, /* Let's calculate the brightness of the planet */ R = sqrt ( xg*xg + yg*yg + zg*zg); - s = SolarPosition.dist; + s = solarPosition.dist; FV = acos( (r*r + R*R - s*s) / (2*r*R)); FV *= 57.29578; /* convert radians to degrees */ switch(idx) @@ -210,10 +210,14 @@ void fgPlanetsRender( void ) { /* $Log$ -/* Revision 1.6 1998/06/27 16:51:54 curt -/* In fgCalculatePlanet() pass a pointer to a structure to be modified, rather -/* than returning the entire structure. +/* Revision 1.7 1998/08/22 02:01:11 curt +/* Nailed a uninitialized variable usage bug that was killing us on some +/* platforms with some compiler options. /* + * Revision 1.6 1998/06/27 16:51:54 curt + * In fgCalculatePlanet() pass a pointer to a structure to be modified, rather + * than returning the entire structure. + * * Revision 1.5 1998/04/28 01:19:01 curt * Type-ified fgTIME and fgVIEW * -- 2.39.5