1
0
Fork 0

Fix memory access beyond vector bounds. Reported by valgrind

This commit is contained in:
Christian Schmitt 2013-03-19 15:05:48 +01:00
parent a74edcd91b
commit a61df8aec0

View file

@ -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;
}
}