fix bug where off_t was assumed to be long long, causing display errors on systems with no large file support

darcs-hash:20061109175804-ac50b-b05ec0aa9ae6f7dd23b7432c321eff44b446397d.gz
This commit is contained in:
axel 2006-11-10 03:58:04 +10:00
parent 79de45eed5
commit 08787c7674

View File

@ -305,7 +305,12 @@ static void get_desc( wchar_t *fn, string_buffer_t *sb, int is_cmd )
const wchar_t *desc;
struct stat buf;
off_t sz;
/*
This is a long long, not an off_t since we really need to know
exactly how large it is when using *printf() to output it.
*/
long long sz;
wchar_t *sz_name[]=
{
L"kB", L"MB", L"GB", L"TB", L"PB", L"EB", L"ZB", L"YB", 0
@ -326,7 +331,7 @@ static void get_desc( wchar_t *fn, string_buffer_t *sb, int is_cmd )
}
else
{
sz = buf.st_size;
sz = (long long)buf.st_size;
}
desc = complete_get_desc( fn );