1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 10:19:33 +02:00

fixed possible IOOBE

This commit is contained in:
Nikolay Pultsin 2014-08-18 13:10:36 +01:00
parent 17dbf622f4
commit 3d7577f889

View file

@ -122,7 +122,7 @@ public class JellyBeanSpanFixTextView extends TextView {
for (Object span : spans) { for (Object span : spans) {
int spanStart = builder.getSpanStart(span); int spanStart = builder.getSpanStart(span);
if (isNotSpace(builder, spanStart - 1)) { if (spanStart > 0 && isNotSpace(builder, spanStart - 1)) {
builder.insert(spanStart, " "); builder.insert(spanStart, " ");
spansWithSpacesBefore.add(span); spansWithSpacesBefore.add(span);
} }