mirror of https://github.com/tmux/tmux.git
Don't dereference NULL if buf winds up being empty. Can't happen
right now according to NicM but better safe than sorry. OK nicm@pull/1/head
parent
df91860b52
commit
3686645e77
|
@ -45,7 +45,8 @@ attributes_tostring(u_char ch)
|
|||
strlcat(buf, "hidden,", sizeof (buf));
|
||||
if (ch & GRID_ATTR_ITALICS)
|
||||
strlcat(buf, "italics,", sizeof (buf));
|
||||
*(strrchr(buf, ',')) = '\0';
|
||||
if (*buf)
|
||||
*(strrchr(buf, ',')) = '\0';
|
||||
|
||||
return (buf);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue