Skip to content

Commit

Permalink
Index with iterator value in CAMService::startCapture rather than get…
Browse files Browse the repository at this point in the history
…SingleIndex()

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
  • Loading branch information
NerduMiner authored May 11, 2024
1 parent 9a50a57 commit 2f9d5e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/services/cam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 2f9d5e3

Please sign in to comment.