fix array index out of bounds (#26)

This commit is contained in:
おいがみ
2017-05-25 13:37:08 -04:00
committed by Gines
parent 2b6e7a52ca
commit 763cd1ff03
+1 -1
View File
@@ -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;