|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r86359 - trunk/boost/geometry/io/wkt
From: barend.gehrels_at_[hidden]
Date: 2013-10-18 16:57:15
Author: barendgehrels
Date: 2013-10-18 16:57:15 EDT (Fri, 18 Oct 2013)
New Revision: 86359
URL: http://svn.boost.org/trac/boost/changeset/86359
Log:
[geometry] avoid referencing *(end-1) if size <=1
Text files modified:
trunk/boost/geometry/io/wkt/write.hpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
Modified: trunk/boost/geometry/io/wkt/write.hpp
==============================================================================
--- trunk/boost/geometry/io/wkt/write.hpp Fri Oct 18 16:48:31 2013 (r86358)
+++ trunk/boost/geometry/io/wkt/write.hpp 2013-10-18 16:57:15 EDT (Fri, 18 Oct 2013) (r86359)
@@ -145,7 +145,9 @@
}
// optionally, close range to ring by repeating the first point
- if (force_closed && geometry::disjoint(*begin, *(end - 1)))
+ if (force_closed
+ && boost::size(range) > 1
+ && geometry::disjoint(*begin, *(end - 1)))
{
os << ",";
stream_type::apply(os, *begin);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk