X-Git-Url: https://code.delx.au/refind/blobdiff_plain/8a022469fd357843cae711c545ea55070c336280..71f1ea86f5e97c4da1adadcc62685c4030f2d740:/gptsync/os_efi.c diff --git a/gptsync/os_efi.c b/gptsync/os_efi.c index 91ee3a7..e40037f 100644 --- a/gptsync/os_efi.c +++ b/gptsync/os_efi.c @@ -51,7 +51,7 @@ EFI_BLOCK_IO *BlockIO = NULL; // Returns size of disk in blocks UINT64 disk_size(VOID) { - return (UINT64) BlockIO->Media->LastBlock; + return (UINT64) (BlockIO->Media->LastBlock + 1); } // UINT64 disk_size() UINTN read_sector(UINT64 lba, UINT8 *buffer)