fix: crash

This commit is contained in:
ZavaruKitsu 2024-02-12 00:39:01 +03:00
parent 5bb633d982
commit af18da81f4

View file

@ -62,7 +62,9 @@ SparseIdsList::AddResult SparseIdsList::addRangeItemsAndCountNew(
SparseIdsSliceUpdate &update,
const Range &messages,
MsgRange noSkipRange) {
Expects(noSkipRange.from <= noSkipRange.till);
if (noSkipRange.from <= noSkipRange.till) {
return { 0 }; // AyuGram: fix crash when using `saveDeletedMessages`
}
if (noSkipRange.from == noSkipRange.till
&& std::begin(messages) == std::end(messages)) {