For ACPI checksum, use header.length, not sizeof

There should be no difference between header.length and sizeof, but if
there is, the correct checksum should be based on header.length.
This commit is contained in:
Lauri Kenttä
2016-05-14 10:57:56 +03:00
parent 9891039b06
commit 31323a5111

View File

@@ -96,7 +96,7 @@ static void FillBGRT(ACPI_BGRT* bgrt, BMP* new_bmp, int new_x, int new_y) {
Debug(L"HackBGRT: BMP at (%d, %d).\n", (int) bgrt->image_offset_x, (int) bgrt->image_offset_y);
bgrt->header.checksum = 0;
bgrt->header.checksum = CalculateAcpiChecksum(bgrt, sizeof(*bgrt));
bgrt->header.checksum = CalculateAcpiChecksum(bgrt, bgrt->header.length);
}
/**