diff options
Diffstat (limited to 'libgeome_get_from_command.c')
-rw-r--r-- | libgeome_get_from_command.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libgeome_get_from_command.c b/libgeome_get_from_command.c index 4d1c5af..8e224b6 100644 --- a/libgeome_get_from_command.c +++ b/libgeome_get_from_command.c @@ -75,8 +75,8 @@ libgeome_get_from_command(struct libgeome_context *ctx, struct libgeome_data *ou free(text); if (out->requested_data & LIBGEOME_DATUM_LATITUDE) { - if (!isfinite(location.latitude) || location.latitude < -90 || location.latitude > -90) { - ctx->print_debug(ctx, "invalide latitude retrieved: %g\n", location.latitude); + if (!isfinite(location.latitude) || location.latitude < -90 || location.latitude > 90) { + ctx->print_debug(ctx, "invalid latitude retrieved: %g\n", location.latitude); out->requested_data ^= LIBGEOME_DATUM_LATITUDE; } else { out->latitude = location.latitude; @@ -84,8 +84,8 @@ libgeome_get_from_command(struct libgeome_context *ctx, struct libgeome_data *ou } if (out->requested_data & LIBGEOME_DATUM_LONGITUDE) { - if (!isfinite(location.longitude) || location.longitude < -90 || location.longitude > -90) { - ctx->print_debug(ctx, "invalide longitude retrieved: %g\n", location.longitude); + if (!isfinite(location.longitude) || location.longitude < -180 || location.longitude > 180) { + ctx->print_debug(ctx, "invalid longitude retrieved: %g\n", location.longitude); out->requested_data ^= LIBGEOME_DATUM_LONGITUDE; } else { out->longitude = location.longitude; |