提交 763cd1ff 编写于 作者: おいがみ 提交者: Gines

fix array index out of bounds (#26)

上级 2b6e7a52
......@@ -464,7 +464,7 @@ namespace op
maxQueueId = fastMax(maxQueueId, fastMax(std::get<2>(threadWorkerQueue), std::get<3>(threadWorkerQueue)));
// Check each queue id has at least a worker that uses it as input and another one as output. Special cases:
std::vector<std::pair<bool, bool>> usedQueueIds(maxQueueId, {false, false});
std::vector<std::pair<bool, bool>> usedQueueIds(maxQueueId + 1, {false, false});
for (const auto& threadWorkerQueue : mThreadWorkerQueues)
{
usedQueueIds[std::get<2>(threadWorkerQueue)].first = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册