swaynag: remove trailing newlines in config

Now that swaynag uses getline (instead of the old readline), the
trailing newline characters have to be removed when reading the config
master
Brian Ashworth 6 years ago committed by emersion
parent 920c64f569
commit 665381d305

@ -348,6 +348,10 @@ int swaynag_load_config(char *path, struct swaynag *swaynag, list_t *types) {
continue;
}
if (line[nread - 1] == '\n') {
line[nread - 1] = '\0';
}
if (line[0] == '[') {
char *close = strchr(line, ']');
if (!close) {

Loading…
Cancel
Save