Show
Ignore:
Timestamp:
2006-12-07 03:34:34 (2 years ago)
Author:
Thomas Roessler <roessler@…>
Branch:
HEAD
Message:

- my_mbtowcs didn't recover from bad multibyte sequences

- mutt_format_string was called under the assumption that this

function can operate in-place. Unfortunately, that assumption
only holds if replacement_char() returns a one-byte character.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • commands.c

    r4667 r4889  
    238238{ 
    239239  char prompt[SHORT_STRING]; 
     240  char scratch[SHORT_STRING]; 
    240241  char buf[HUGE_STRING] = { 0 }; 
    241242  ADDRESS *adr = NULL; 
     
    279280 
    280281#define extra_space (15 + 7 + 2) 
    281   snprintf (prompt, sizeof (prompt), 
     282  snprintf (scratch, sizeof (scratch), 
    282283           (h ? _("Bounce message to %s") : _("Bounce messages to %s")), buf); 
    283284 
     
    286287    mutt_format_string (prompt, sizeof (prompt), 
    287288                        0, COLS-extra_space, 0, 0, 
    288                         prompt, sizeof (prompt), 0); 
     289                        scratch, sizeof (scratch), 0); 
    289290    safe_strcat (prompt, sizeof (prompt), "...?"); 
    290291  } 
    291292  else 
    292     safe_strcat (prompt, sizeof (prompt), "?"); 
     293    snprintf (prompt, sizeof (prompt), "%s?", scratch); 
    293294 
    294295  if (query_quadoption (OPT_BOUNCE, prompt) != M_YES)