Ticket #3666: display.c.patch

File display.c.patch, 1.0 KB (added by michael-o, 7 years ago)
  • src/viewer/display.c

    diff --git a/src/viewer/display.c b/src/viewer/display.c
    index 40e57a6..1f90aec 100644
    a b  
    5656 
    5757/*** file scope macro definitions ****************************************************************/ 
    5858 
    59 #define BUF_TRUNC_LEN 5         /* The length of the line displays the file size */ 
     59#define BUF_TRUNC_LEN 11        /* The length of the line displays the file size */ 
    6060 
    6161/*** file scope type declarations ****************************************************************/ 
    6262 
    mcview_display_status (WView * view) 
    174174        { 
    175175            char buffer[BUF_TRUNC_LEN + 1]; 
    176176 
    177             size_trunc_len (buffer, BUF_TRUNC_LEN, mcview_get_filesize (view), 0, 
     177            size_trunc_len (buffer, sizeof (buffer) - 1, mcview_get_filesize (view), 0, 
    178178                            panels_options.kilobyte_si); 
    179179            tty_printf ("%9" PRIuMAX "/%s%s %s", (uintmax_t) view->dpy_end, 
    180180                        buffer, mcview_may_still_grow (view) ? "+" : " ",