Index with iterator value in CAMService::startCapture rather than getSingleIndex()

The port may have a value of 3 in this function, which will cause a panic. getPortIndices() handles this case for us already, so the iterator vale is safe to use
This commit is contained in:
NerduMiner
2024-05-11 15:04:53 -04:00
committed by GitHub
parent 9a50a57d32
commit 2f9d5e30b4

View File

@@ -343,7 +343,7 @@ void CAMService::startCapture(u32 messagePointer) {
if (port.isValid()) {
for (int i : port.getPortIndices()) {
auto& event = ports[port.getSingleIndex()].receiveEvent;
auto& event = ports[i].receiveEvent;
// Until we properly implement cameras, immediately signal the receive event
if (event.has_value()) {