diff options
author | Ken Hughes <khughes@pacific.edu> | 2007-03-07 09:19:15 +0300 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2007-03-07 09:19:15 +0300 |
commit | 4e5ad50079f3e7ff93430b03b51523b00d1892c7 (patch) | |
tree | da5a320cd1f3eeb168c626c9b970926254a59d16 /source/blender/blenlib | |
parent | 69dc499ee7ff9dc160aeab07e1e0daf811305f37 (diff) |
Tools
-----
Bugfix #6174: files larger than (2^31)-1 bytes were reported with negative
sizes in file manager windows. Added a cast to unsigned int before doing
conversions for the UI.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index f667676117b..a6b91bf489d 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -387,7 +387,12 @@ void BLI_adddirstrings() strftime(files[num].time, 8, "%H:%M", tm); strftime(files[num].date, 16, "%d-%b-%y", tm); - st_size= files[num].s.st_size; + /* + * Seems st_size is signed 32-bit value in *nix and Windows. This + * will buy us some time until files get bigger than 4GB or until + * everyone starts using __USE_FILE_OFFSET64 or equivalent. + */ + st_size= (unsigned int)files[num].s.st_size; num1= st_size % 1000; num2= st_size/1000; |