bounds check with setVertex(PVector) (fixes #2556)

This commit is contained in:
Ben Fry
2014-07-30 21:43:55 -04:00
parent bff235dcb9
commit b7756bcb1f
2 changed files with 8 additions and 1 deletions
+6 -1
View File
@@ -2065,7 +2065,12 @@ public class PShape implements PConstants {
vertices[index][X] = vec.x;
vertices[index][Y] = vec.y;
vertices[index][Z] = vec.z;
if (vertices[index].length > 2) {
vertices[index][Z] = vec.z;
} else if (vec.z != 0 && vec.z == vec.z) {
throw new IllegalArgumentException("Cannot set a z-coordinate on a 2D shape");
}
}
+2
View File
@@ -4,6 +4,8 @@ X https://github.com/processing/processing/issues/2228
X https://github.com/processing/processing/pull/2324
X move to native OS X full screen (gets rid of native code)
X https://github.com/processing/processing/issues/2641
X do bounds check on setVertex(PVector)
X https://github.com/processing/processing/issues/2556
data
X add copy() method to Table