8c2ae8
Changes in the handling of comments caused some length fields to be used
8c2ae8
in new ways.  The new way broke the existing adaptation for big endian
8c2ae8
support; this patch repairs that adaptation.
8c2ae8
8c2ae8
Signed-off-by: Al Stone <ahs3@redhat.com>
8c2ae8
8c2ae8
diff -Naur acpica-unix2-20180531.orig/source/compiler/aslcodegen.c acpica-unix2-20180531/source/compiler/aslcodegen.c
8c2ae8
--- acpica-unix2-20180531.orig/source/compiler/aslcodegen.c	2018-07-06 20:28:35.255546578 -0400
8c2ae8
+++ acpica-unix2-20180531/source/compiler/aslcodegen.c	2018-07-06 20:32:10.373797644 -0400
8c2ae8
@@ -494,8 +494,7 @@
8c2ae8
 
8c2ae8
     /* Table length. Checksum zero for now, will rewrite later */
8c2ae8
 
8c2ae8
-    DWord = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength;
8c2ae8
-    ACPI_MOVE_32_TO_32(&TableHeader.Length, &DWord);
8c2ae8
+    TableHeader.Length = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength;
8c2ae8
 
8c2ae8
     /* Calculate the comment lengths for this definition block parseOp */
8c2ae8
 
8c2ae8
@@ -539,6 +538,8 @@
8c2ae8
         CvDbgPrint ("    Length: %u\n", CommentLength);
8c2ae8
         }
8c2ae8
     }
8c2ae8
+    DWord = TableHeader.Length;
8c2ae8
+    ACPI_MOVE_32_TO_32(&TableHeader.Length, &DWord);
8c2ae8
 
8c2ae8
     TableHeader.Checksum = 0;
8c2ae8