fix by Szaka (logic inversion in ntfs_device_size_get())

(Logical change 1.92)
edge.strict_endians
cantab.net!aia21 2003-01-13 17:17:52 +00:00
parent 416ce477d3
commit f84e1e7a1c
1 changed files with 2 additions and 2 deletions

View File

@ -398,12 +398,12 @@ s64 ntfs_device_size_get(int f, int block_size)
* so do binary search to find the size of the device.
*/
low = 0LL;
for (high = 1024LL; ntfs_device_offset_valid(f, high); high <<= 1)
for (high = 1024LL; !ntfs_device_offset_valid(f, high); high <<= 1)
low = high;
while (low < high - 1LL) {
const s64 mid = (low + high) / 2;
if (ntfs_device_offset_valid(f, mid))
if (!ntfs_device_offset_valid(f, mid))
low = mid;
else
high = mid;