]> granicus.if.org Git - postgis/commitdiff
gbox_float_round: do not attempt to round M when not present
authorSandro Santilli <strk@keybit.net>
Thu, 12 Jan 2012 08:51:58 +0000 (08:51 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 12 Jan 2012 08:51:58 +0000 (08:51 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8784 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/g_box.c

index 61cb1d6dbcc2187305bf6f9509d0b6aaea91379f..5200b7b45d77279837aed5d7d1b56c435855c855 100644 (file)
@@ -577,8 +577,11 @@ void gbox_float_round(GBOX *gbox)
        gbox->ymin = next_float_down(gbox->ymin);
        gbox->ymax = next_float_up(gbox->ymax);
 
-       gbox->mmin = next_float_down(gbox->mmin);
-       gbox->mmax = next_float_up(gbox->mmax);
+       if ( FLAGS_GET_M(gbox->flags) )
+       {
+               gbox->mmin = next_float_down(gbox->mmin);
+               gbox->mmax = next_float_up(gbox->mmax);
+       }
 
        if ( FLAGS_GET_Z(gbox->flags) )
        {