diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 7b10449615..4a413b4035 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -353,7 +353,7 @@ void FacebookProto::LoadHistory(void *pParam) std::string lastMessageId; int loadedMessages = 0; int messagesPerBatch = messagesCount > 10000 ? 500 : 100; - for (int batch = 0; batch < messagesCount; batch += messagesPerBatch) { + for (int batch = 0, batchLimit = messagesCount + messagesPerBatch; batch < batchLimit; batch += messagesPerBatch) { if (!isOnline()) break; |