diff --git a/processing/core/PFont.java b/processing/core/PFont.java index e73405a57..fc8741cc1 100644 --- a/processing/core/PFont.java +++ b/processing/core/PFont.java @@ -261,6 +261,10 @@ public class PFont implements PConstants { * @return index into arrays or -1 if not found */ public int index(char c) { + // degenerate case, but the find function will have trouble + // if there are somehow zero chars in the lookup + if (value.length == 0) return -1; + // these chars required in all fonts //if ((c >= 33) && (c <= 126)) { //return c - 33;