2
0
Эх сурвалжийг харах

Use RSDP's length field in revisions 1+

Isaac Woods 4 жил өмнө
parent
commit
43df4bc796
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      acpi/src/rsdp.rs

+ 2 - 2
acpi/src/rsdp.rs

@@ -53,8 +53,8 @@ impl Rsdp {
          * check for version 1.0 and use a hard-coded length instead.
          */
         let length = if self.revision > 0 {
-            // For Version 2.0+, check ALL the fields
-            mem::size_of::<Self>()
+            // For Version 2.0+, include the number of bytes specified by `length`
+            self.length as usize
         } else {
             // For Version 1, only check fields up to v1 length only
             mem::size_of::<[u8; 8]>()