Skip to content

Commit f9f77f7

Browse files
authored
type-c-service/wrapper: Fix index typo in ClearEvents (#459)
1 parent 58a5149 commit f9f77f7

File tree

1 file changed

+3
-2
lines changed
  • type-c-service/src/wrapper

1 file changed

+3
-2
lines changed

type-c-service/src/wrapper/pd.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,9 @@ impl<'a, const N: usize, C: Controller, BACK: Backing<'a>, V: FwOfferValidator>
159159
}
160160
}
161161
controller::PortCommandData::ClearEvents => {
162-
let event = self.active_events[0].get();
163-
self.active_events[0].set(PortEvent::none());
162+
let port_index = local_port.0 as usize;
163+
let event = self.active_events[port_index].get();
164+
self.active_events[port_index].set(PortEvent::none());
164165
Ok(controller::PortResponseData::ClearEvents(event))
165166
}
166167
controller::PortCommandData::RetimerFwUpdateGetState => {

0 commit comments

Comments
 (0)