Skip to content

Commit

Permalink
hot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanRoyer committed Jan 4, 2024
1 parent 457a809 commit 71b6a41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/usb/src/descriptors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ impl Configuration {
/// to locate interface descriptors and interface-specific
/// descriptors.
pub fn find_desc<T: FromBytes>(&self, start_search_at: usize, search: DescriptorType) -> Result<(&T, usize), &'static str> {
let len = (self.inner.total_length - size_of::<ConfigInner>()) as usize;
let len = (self.inner.total_length as usize) - size_of::<ConfigInner>();
let mut i = start_search_at;
while i < len {
let desc_len = self.details[i] as usize;
Expand Down

0 comments on commit 71b6a41

Please sign in to comment.