From ac012aada2b793413f086ace2db0256aa07b5f75 Mon Sep 17 00:00:00 2001 From: "Gergely POLONKAI (W00d5t0ck)" Date: Wed, 18 Sep 2013 22:15:53 +0200 Subject: [PATCH] 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. --- configure.ac | 2 +- src/gswe-moment.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 34667d0..7f349d3 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/src/gswe-moment.c b/src/gswe-moment.c index 3fb296b..fc6e4cd 100644 --- a/src/gswe-moment.c +++ b/src/gswe-moment.c @@ -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 {