Fix a ArrayIndexOutOfBoundsException when loading indexed PNGs. PR: 31675 Submitted by: Thomas Deweese