changeset 5274:66325e8963ef

RT-28335 ArrayIndexOutOfBounds in canvas polys ReviewedBy: Jim,Kevin
author "Joseph Andresen<joseph.andresen@oracle.com>"
date Fri, 04 Oct 2013 16:42:54 -0700
parents 137e59786fc1
children b085eb56ae11
files modules/graphics/src/main/java/javafx/scene/canvas/GraphicsContext.java
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/javafx/scene/canvas/GraphicsContext.java	Fri Oct 04 12:21:00 2013 -0700
+++ b/modules/graphics/src/main/java/javafx/scene/canvas/GraphicsContext.java	Fri Oct 04 16:42:54 2013 -0700
@@ -317,6 +317,7 @@
         for (int i = 0; i < nPoints; i++) {
             if (pos >= polybuf.length) {
                 flushPolyBuf(buf, polybuf, pos, polycmd);
+                pos = 0;
                 polycmd = NGCanvas.LINETO;
             }
             polybuf[pos++] = (float) xPoints[i];