Fix compilation error
[apps/madmutt.git] / lib-ui / sidebar.c
index 6668ca0..3a17817 100644 (file)
@@ -82,7 +82,7 @@ static char *shortened_hierarchy (char *hbox, int maxlen)
           new_box[j++] = hbox[i + 1];
           new_box[j] = 0;
         } else {
-          strcat (&new_box[j], last_dot);
+          m_strcat(&new_box[j], maxlen + 1, last_dot);
           break;
         }
       }
@@ -96,7 +96,7 @@ static const char* sidebar_number_format (char* dest, ssize_t destlen, char op,
                                           const char* src, const char* fmt,
                                           const char* ifstr, const char* elstr,
                                           unsigned long data, format_flag flags) {
-  char tmp[SHORT_STRING];
+  char tmp[STRING];
   BUFFY* b = Incoming.arr[data];
   int opt = flags & M_FORMAT_OPTIONAL;
   int c = Context && !m_strcmp(Context->path, b->path);
@@ -186,7 +186,7 @@ int sidebar_need_count (void) {
 static int make_sidebar_entry (char* sbox, int idx, ssize_t len)
 {
   int shortened = 0, lencnt = 0;
-  char no[SHORT_STRING], entry[SHORT_STRING];
+  char no[STRING], entry[STRING];
   int l = m_strlen(ImapHomeNamespace);
   int l_m = m_strlen(Maildir);
 
@@ -322,7 +322,7 @@ int sidebar_draw (void) {
       i = 0,line;
   BUFFY *tmp;
   ssize_t delim_len = m_strlen(SidebarDelim);
-  char blank[SHORT_STRING];
+  char blank[STRING];
 
   known_lines=last_line-first_line;