瀏覽代碼

Use RSDP's length field in revisions 1+

Isaac Woods 4 年之前
父節點
當前提交
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]>()