glText-Android
glText-Android copied to clipboard
ArrayIndexOutOfBoundsException in getLength() method.
This occurs in the getLength method: (gltext.java: 342)
int c = (int)text.charAt( i ) - CHAR_START; // Calculate Character Index (Offset by First Char in Font) len += ( charWidths[c] * scaleX ); // Add Scaled Character Width to Total Length
If charAt(i) is a char > 96 (special char) then we get ArrayIndexOutOfBoundsException. Needs something similar to :
if ( c < 0 || c >= CHAR_CNT) {