From 71b6a41dba0c5912bb38828048e807f78848fc7e Mon Sep 17 00:00:00 2001 From: Nathan Royer Date: Thu, 4 Jan 2024 18:41:55 +0100 Subject: [PATCH] hot fix --- kernel/usb/src/descriptors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/usb/src/descriptors.rs b/kernel/usb/src/descriptors.rs index 33d1343847..bec449a84b 100644 --- a/kernel/usb/src/descriptors.rs +++ b/kernel/usb/src/descriptors.rs @@ -128,7 +128,7 @@ impl Configuration { /// to locate interface descriptors and interface-specific /// descriptors. pub fn find_desc(&self, start_search_at: usize, search: DescriptorType) -> Result<(&T, usize), &'static str> { - let len = (self.inner.total_length - size_of::()) as usize; + let len = (self.inner.total_length as usize) - size_of::(); let mut i = start_search_at; while i < len { let desc_len = self.details[i] as usize;