diff --git a/src/com/fsck/k9/mail/store/ImapStore.java b/src/com/fsck/k9/mail/store/ImapStore.java index 1e592312c..ec77a1dd2 100644 --- a/src/com/fsck/k9/mail/store/ImapStore.java +++ b/src/com/fsck/k9/mail/store/ImapStore.java @@ -1103,7 +1103,7 @@ public class ImapStore extends Store { - for (int windowStart = 0; windowStart <= messages.length; windowStart += (FETCH_WINDOW_SIZE)) { + for (int windowStart = 0; windowStart < messages.length; windowStart += (FETCH_WINDOW_SIZE)) { List uidWindow = uids.subList(windowStart, Math.min((windowStart + FETCH_WINDOW_SIZE), messages.length)); try {