1
0
mirror of https://github.com/tmate-io/tmate-ssh-server.git synced 2020-11-18 19:53:51 -08:00

Handle a # at the end of a replacement string (such as status-left)

correctly. Found by Thomas Adam.
This commit is contained in:
Nicholas Marriott 2011-01-03 21:30:49 +00:00
parent 3e8124009f
commit 5158dd9a8d

View File

@ -456,7 +456,7 @@ status_replace(struct client *c,
break;
ch = *iptr++;
if (ch != '#') {
if (ch != '#' || *iptr == '\0') {
*optr++ = ch;
continue;
}