Prevent index out of bounds when using String.substring.

Change-Id: Ib30f9646e9895b6a2f065a0b2e51cf53e821b087
1 file changed