View Full Version : [Fixed] files >2 GB list as negative
ADDiCT
10-26-2003, 05:31 AM
using beta 5.2.3r
a file of 2.378.785.791 bytes (2,21 GB) gets listed as -1916181505 bytes
(the limitation of a signed 32-bit value)
Bratell
10-26-2003, 12:31 PM
Originally posted by ADDiCT
using beta 5.2.3r
a file of 2.378.785.791 bytes (2,21 GB) gets listed as -1916181505 bytes
(the limitation of a signed 32-bit value)
I've also noted this. I'm running W2k NTFS if it's of any significance.
darkone
10-26-2003, 12:32 PM
That's odd.. it shows correct values for 8gb file for me (file that i use testing large transfers)
ADDiCT
10-26-2003, 12:35 PM
the file is on a FAT32 partition... but Windows Explorer and Serv-U show the correct filesize
darkone
10-26-2003, 01:22 PM
if (lpFindData->nFileSizeHigh <= 0)
{
// Filesize <= 32bits
Put_Buffer_Format((LPBUFFER)lpContext, "-%.9s 0 %-12.12s %-12.12s %8i %s %02d %02d:%02d %s\r\n",
pBuffer, szUserName, szGroupName,
lpFindData->nFileSizeLow,
Months[SystemTime.wMonth], SystemTime.wDay, SystemTime.wHour, SystemTime.wMinute,
lpFindData->cFileName);
}
else
{
// Filesize > 32bits
Put_Buffer_Format((LPBUFFER)lpContext, "-%.9s 0 %-12.12s %-12.12s %8I64i %s %02d %02d:%02d %s\r\n",
pBuffer, szUserName, szGroupName,
lpFindData->nFileSizeHigh * (0x100000000) + lpFindData->nFileSizeLow,
Months[SystemTime.wMonth], SystemTime.wDay, SystemTime.wHour, SystemTime.wMinute,
lpFindData->cFileName);
}
I really can't understand how that would result to negative value :\ (should only happend if loworder part of filesize is negative & highorder part is non-positive)
darkone
10-26-2003, 01:24 PM
Oops.. just noticed that it's a dword, not int :/
Unique
10-26-2003, 01:41 PM
:) another bug squished
vBulletin® v3.8.11 Alpha 3, Copyright ©2000-2024, vBulletin Solutions, Inc.