Merge branch '1718_suse_b_letter_in_prompt'

* 1718_suse_b_letter_in_prompt:
  Ticket #1718: OpenSuse: Showing 'B' artefact in command line of user 'root'
This commit is contained in:
Slava Zanko 2009-10-27 14:43:14 +02:00
commit 143f078738

View File

@ -780,7 +780,8 @@ strip_ctrl_codes (char *s)
for (w = s, r = s; *r; ) {
if (*r == ESC_CHAR) {
/* Skip the control sequence's arguments */ ;
if (*(++r) == '[') {
/* '(' need to avoid strange 'B' letter in *Suse (if mc runs under root user) */
if (*(++r) == '[' || *r == '(') {
/* strchr() matches trailing binary 0 */
while (*(++r) && strchr ("0123456789;?", *r));
} else