From ebf35000c980288dedf387ac4f05a7213f3c4f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Tue, 30 Jul 2013 11:42:59 +0200 Subject: [PATCH] Fixed computing a file size on Windows The lower part should not have been sign-extended. --- libntfs-3g/win32_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libntfs-3g/win32_io.c b/libntfs-3g/win32_io.c index 1e5b2bc4..6195f8a5 100644 --- a/libntfs-3g/win32_io.c +++ b/libntfs-3g/win32_io.c @@ -599,7 +599,7 @@ static s64 ntfs_device_win32_getsize(HANDLE handle) ntfs_log_trace("Couldn't get file size.\n"); return -1; } - return ((s64)hiword << 32) + loword; + return ((s64)hiword << 32) + (ULONG)loword; } /**