new_title may contain a \r, remove it

This commit is contained in:
Holger Vogt 2019-09-06 22:30:34 +02:00
parent 435520afbe
commit cdc8d3d054
1 changed files with 3 additions and 1 deletions

View File

@ -872,7 +872,9 @@ struct inp_read_t inp_read(
tfree(new_title);
new_title = copy(s);
if ((s = strchr(new_title, '\n')) != NULL)
*s = ' ';
*s = '\0';
if ((s = strchr(new_title, '\r')) != NULL)
*s = '\0';
*buffer = '*'; /* change .TITLE line to comment line */
}