From 64d9b508939fb15d72fdfa825ee8938506764d66 Mon Sep 17 00:00:00 2001 From: "Thomas G. Lockhart" Date: Sun, 11 May 1997 15:11:47 +0000 Subject: Fix timezone manipulation code to avoid crashes on some machines. Add type conversion functions for floating point numbers. Check for zero in unary minus floating point code (IEEE allows an explicit negative zero which looks ugly in a query result!). Ensure circle type has non-negative radius. --- src/backend/utils/adt/geo_ops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/utils/adt/geo_ops.c') diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c index 3489f6cf2b..0b485007ee 100644 --- a/src/backend/utils/adt/geo_ops.c +++ b/src/backend/utils/adt/geo_ops.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.5 1997/05/06 07:27:51 thomas Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.6 1997/05/11 15:11:41 thomas Exp $ * *------------------------------------------------------------------------- */ @@ -2639,7 +2639,7 @@ poly_path(POLYGON *poly) * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.5 1997/05/06 07:27:51 thomas Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.6 1997/05/11 15:11:41 thomas Exp $ * *------------------------------------------------------------------------- */ @@ -2722,7 +2722,7 @@ CIRCLE *circle_in(char *str) if (*s == DELIM) s++; while (isspace( *s)) s++; - if (! single_decode( s, &circle->radius, &s)) + if ((! single_decode( s, &circle->radius, &s)) || (circle->radius < 0)) elog (WARN, "Bad circle external representation '%s'",str); while (depth > 0) { -- cgit v1.2.1