make the point1 and point2 variables local to the getSortedSegments method, no functional change, p=igrcic (closes #2217)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9612 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2009-08-05 07:28:08 +00:00
parent 0f35a3a434
commit 868f886cad

View File

@@ -127,7 +127,7 @@ OpenLayers.Geometry.LineString = OpenLayers.Class(OpenLayers.Geometry.Curve, {
*/
getSortedSegments: function() {
var numSeg = this.components.length - 1;
var segments = new Array(numSeg);
var segments = new Array(numSeg), point1, point2;
for(var i=0; i<numSeg; ++i) {
point1 = this.components[i];
point2 = this.components[i + 1];