<<< Date Index >>>     <<< Thread Index >>>

[bugfix] Re: mutt/2191 file sizes >2GB reported incorrectly



Hello,
I made a patch that fixes this bug with files larger than 2GB.
made a patch from CVS mirrored at dev.mutt.org

it is attached =)

Thanks in advance
-- 
Bruno Ribas - ribas@xxxxxxx
? patch.diff
Index: browser.c
===================================================================
RCS file: /cvsroots/mutt/browser.c,v
retrieving revision 3.19
diff -u -p -r3.19 browser.c
--- browser.c   6 Oct 2005 06:15:00 -0000       3.19
+++ browser.c   21 Apr 2006 19:30:32 -0000
@@ -40,6 +40,7 @@
 #include <unistd.h>
 #include <sys/stat.h>
 #include <errno.h>
+#include <inttypes.h>
 
 static struct mapping_t FolderHelp[] = {
   { N_("Exit"),  OP_EXIT },
@@ -265,8 +266,8 @@ folder_format_str (char *dest, size_t de
     case 's':
       if (folder->ff->st != NULL)
       {
-       snprintf (tmp, sizeof (tmp), "%%%sld", fmt);
-       snprintf (dest, destlen, tmp, (long) folder->ff->st->st_size);
+       snprintf (tmp, sizeof (tmp), "%%%s" PRId64 , fmt);
+       snprintf (dest, destlen, tmp, folder->ff->st->st_size);
       }
       else
        mutt_format_s (dest, destlen, fmt, "");