From 31323a5111e5bdf9e52d1b368bfaa7621bca1822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20Kentt=C3=A4?= Date: Sat, 14 May 2016 10:57:56 +0300 Subject: [PATCH] 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. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index d327542..c7a1a09 100644 --- a/src/main.c +++ b/src/main.c @@ -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); } /**