From: Andre Noll Date: Sun, 4 Jul 2010 21:17:41 +0000 (+0200) Subject: gui: Replace also \r and \f by spaces. X-Git-Tag: v0.4.3~3 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;h=73d23e6bddcc4d1b6d46a31307ca56f586b541ad;hp=77b17730de748201537120c683678cf0e0316de2;p=paraslash.git gui: Replace also \r and \f by spaces. id3 comments might contain these characters which can mess up the curses output. --- diff --git a/gui.c b/gui.c index dbe0a19c..865ed658 100644 --- a/gui.c +++ b/gui.c @@ -294,9 +294,9 @@ static int align_str(WINDOW* win, char *str, unsigned int len, str[len] = '\0'; num = 0; } - /* replace newlines by spaces */ + /* replace control characters by spaces */ for (i = 0; i < len && str[i]; i++) { - if (str[i] == '\n') + if (str[i] == '\n' || str[i] == '\r' || str[i] == '\f') str[i] = ' '; } if (align == LEFT) {