mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-15 18:59:54 +00:00
vector: + exception handling
prevent a case of dividing by zero.
This commit is contained in:
parent
f31cb8c968
commit
e0d60eb058
@ -429,7 +429,9 @@ public:
|
||||
if (_q[(i + n) % _count].try_push(std::move(task))) return;
|
||||
}
|
||||
|
||||
_q[i % _count].push(std::move(task));
|
||||
if (_count > 0) {
|
||||
_q[i % _count].push(std::move(task));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user