From 15f300412afab32c3be288f33fc085c6bed75442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Tue, 11 Mar 2014 10:37:27 +0100 Subject: [PATCH] Fixed displaying the correct sector number in error message When opening a volume, the availability of the last sector is checked, but the error message mentioned a wrong sector. --- libntfs-3g/bootsect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libntfs-3g/bootsect.c b/libntfs-3g/bootsect.c index e9be072d..92c8505d 100644 --- a/libntfs-3g/bootsect.c +++ b/libntfs-3g/bootsect.c @@ -204,7 +204,7 @@ int ntfs_boot_sector_parse(ntfs_volume *vol, const NTFS_BOOT_SECTOR *bs) (sectors - 1) << vol->sector_size_bits, SEEK_SET) == -1) { ntfs_log_perror("Failed to read last sector (%lld)", - (long long)sectors); + (long long)(sectors - 1)); ntfs_log_error("%s", last_sector_error); return -1; }