fix: grow of GeometryBuffer properly

This commit is contained in:
Hannes Janetzek 2013-05-06 04:42:19 +02:00
parent 9d96be70fa
commit 9bbfef02ad

View File

@ -97,7 +97,9 @@ public class GeometryBuffer {
// 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)
index[indexPos + 1] = -1; index[indexPos + 1] = -1;
} }
@ -122,7 +124,9 @@ public class GeometryBuffer {
// 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)
index[indexPos + 1] = -1; index[indexPos + 1] = -1;
} }