Fix index out of bounds

This commit is contained in:
Andreas Schildbach 2013-10-11 16:43:43 +02:00
parent b3bffe7edb
commit aa3977ed8e

View file

@ -68,7 +68,7 @@ public final class Line implements Serializable, Comparable<Line>
this.attrs = attrs;
this.message = message;
product = label != null ? label.charAt(0) : '?';
product = (label != null && label.length() >= 1) ? label.charAt(0) : '?';
}
public boolean hasAttr(final Attr attr)