mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Fix crash in streaming parts loading.
This commit is contained in:
parent
a59353df9f
commit
9ed064b7fc
1 changed files with 1 additions and 1 deletions
|
@ -812,7 +812,7 @@ bool Reader::fillFromSlices(int offset, bytes::span buffer) {
|
|||
// HeaderMode::Good and really are putting the first slice to cache.
|
||||
Assert(result.toCache.number > 0 || _slices.isGoodHeader());
|
||||
|
||||
const auto index = std::min(result.toCache.number, 1) - 1;
|
||||
const auto index = std::max(result.toCache.number, 1) - 1;
|
||||
cancelLoadInRange(index * kInSlice, (index + 1) * kInSlice);
|
||||
putToCache(std::move(result.toCache));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue