]> granicus.if.org Git - postgis/commitdiff
Fix stupid mistake in the liblwgeom parser...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Sun, 5 Oct 2008 17:33:03 +0000 (17:33 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Sun, 5 Oct 2008 17:33:03 +0000 (17:33 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@3067 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwgparse.c

index df81045e332cf48921e909b63b86f458874512f8..14612d8fa3d3f23214a2d4ddb5ae271a837c5f4a 100644 (file)
@@ -288,14 +288,14 @@ popc(void)
        }
 
        /* If the odd number point check has been enabled, perform it */
-       if (parser_check_flags & PARSER_CHECK_CLOSURE) {
+       if (parser_check_flags & PARSER_CHECK_ODD) {
                if(isodd != -1 && the_geom.stack->uu.nn.num % 2 != isodd) {
                        error("geometry must have an odd number of points");
                }
        }
 
        /* If the polygon closure check has been enabled, perform it */
-       if (parser_check_flags & PARSER_CHECK_ODD) {
+       if (parser_check_flags & PARSER_CHECK_CLOSURE) {
                if ( checkclosed && first_point && last_point) {
                        if ( memcmp(first_point, last_point,
                                sizeof(double)*the_geom.ndims) )