Bug fix in find_antiscion()

Was assuming that first parameter is a pointer to an enum. It is
actually an int converted to a pointer with GINT_TO_POINTER.
This commit is contained in:
Gergely Polonkai 2013-09-18 22:15:53 +02:00
parent 5b0a2b33c1
commit ac012aada2
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,6 @@
m4_define([swe_glib_major_version], [1])
m4_define([swe_glib_minor_version], [0])
m4_define([swe_glib_micro_version], [3])
m4_define([swe_glib_micro_version], [5])
m4_define([swe_glib_version], [swe_glib_major_version.swe_glib_minor_version.swe_glib_micro_version])
m4_define([swe_glib_api_version], [swe_glib_major_version.0])

View File

@ -1161,13 +1161,14 @@ gswe_moment_get_planet_aspects(GsweMoment *moment, GswePlanet planet, GError **e
}
static gboolean
find_antiscion(GsweAntiscionAxis *axis, GsweAntiscionAxisInfo *antiscion_info, GsweAntiscionData *antiscion_data)
find_antiscion(gpointer axis_p, GsweAntiscionAxisInfo *antiscion_info, GsweAntiscionData *antiscion_data)
{
GsweAntiscionAxis axis;
gdouble start_point,
axis_position,
planet_orb;
if (*axis == GSWE_ANTISCION_AXIS_NONE) {
if ((axis = GPOINTER_TO_INT(axis_p)) == GSWE_ANTISCION_AXIS_NONE) {
return FALSE;
}
@ -1186,7 +1187,7 @@ find_antiscion(GsweAntiscionAxis *axis, GsweAntiscionAxisInfo *antiscion_info, G
if ((antiscion_data->difference = fabs(antiscion_data->planet2->position - axis_position)) <= planet_orb) {
antiscion_data->antiscion_info = antiscion_info;
antiscion_data->axis = *axis;
antiscion_data->axis = axis;
return TRUE;
} else {