From 2f9d5e30b409d0498c8a235b09b2a15181d43a75 Mon Sep 17 00:00:00 2001 From: NerduMiner Date: Sat, 11 May 2024 15:04:53 -0400 Subject: [PATCH] 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 --- src/core/services/cam.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/services/cam.cpp b/src/core/services/cam.cpp index b3dfd1dcf..d9c005e74 100644 --- a/src/core/services/cam.cpp +++ b/src/core/services/cam.cpp @@ -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()) {