fix: GeometryBuffer.startLine()

- *always* set end marker
This commit is contained in:
Hannes Janetzek 2014-02-21 22:26:14 +01:00
parent 2583ad2ce6
commit d8e23fbafe

View File

@ -177,15 +177,15 @@ public class GeometryBuffer {
setOrCheckMode(GeometryType.LINE); setOrCheckMode(GeometryType.LINE);
// ignore // ignore
if (index[indexPos] == 0) if (index[indexPos] > 0) {
return this;
// start next // start next
if ((index[0] >= 0) && (++indexPos >= index.length)) if ((index[0] >= 0) && (++indexPos >= index.length))
ensureIndexSize(indexPos, true); ensureIndexSize(indexPos, true);
// initialize with zero points // initialize with zero points
index[indexPos] = 0; index[indexPos] = 0;
}
// set new end marker // set new end marker
if (index.length > indexPos + 1) if (index.length > indexPos + 1)