From a41bc97e1b958d227a5b6a9f3b829598b1ddf091 Mon Sep 17 00:00:00 2001 From: mintsuki Date: Thu, 14 Jul 2022 15:20:16 +0200 Subject: [PATCH] limine-deploy: Fix bug where sizeof(struct gpt_entry) was used where it should not --- host/limine-deploy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/host/limine-deploy.c b/host/limine-deploy.c index aa0b4eba..2d425b81 100644 --- a/host/limine-deploy.c +++ b/host/limine-deploy.c @@ -792,7 +792,7 @@ int main(int argc, char *argv[]) { struct gpt_entry gpt_entry; device_read(&gpt_entry, (ENDSWAP(gpt_header.partition_entry_lba) * lb_size) - + (partition_num * sizeof(struct gpt_entry)), + + (partition_num * ENDSWAP(gpt_header.size_of_partition_entry)), sizeof(struct gpt_entry)); if (gpt_entry.unique_partition_guid[0] == 0 && @@ -815,7 +815,7 @@ int main(int argc, char *argv[]) { struct gpt_entry gpt_entry; device_read(&gpt_entry, (ENDSWAP(gpt_header.partition_entry_lba) * lb_size) - + (i * sizeof(struct gpt_entry)), + + (i * ENDSWAP(gpt_header.size_of_partition_entry)), sizeof(struct gpt_entry)); if (gpt_entry.unique_partition_guid[0] != 0 ||