diff --git a/src/Lib/terragear/tg_contour.cxx b/src/Lib/terragear/tg_contour.cxx index d422edde..46a999b8 100644 --- a/src/Lib/terragear/tg_contour.cxx +++ b/src/Lib/terragear/tg_contour.cxx @@ -38,7 +38,7 @@ double tgContour::GetMinimumAngle( void ) const p2_index = i; - if ( i == size ) { + if ( i == size - 1 ) { p3_index = 0; } else { p3_index = i + 1; @@ -852,4 +852,4 @@ std::ostream& operator<< ( std::ostream& output, const tgContour& subject ) output << "Hole: " << subject.hole << "\n"; return output; -} \ No newline at end of file +}