mirror of
https://github.com/vale981/spectrwm
synced 2025-03-05 09:51:38 -05:00
Trim trailing whitespace when loading config
This commit is contained in:
parent
ba474302eb
commit
94b5bca182
1 changed files with 5 additions and 0 deletions
|
@ -9573,6 +9573,11 @@ conf_load(const char *filename, int keymapping)
|
|||
configopt[optidx].optname);
|
||||
continue;
|
||||
}
|
||||
/* trim trailing spaces */
|
||||
ce = optval + strlen(optval) - 1;
|
||||
while (ce > optval && isspace(*ce))
|
||||
--ce;
|
||||
*(ce + 1) = '\0';
|
||||
/* call function to deal with it all */
|
||||
if (configopt[optidx].func(optsub, optval,
|
||||
configopt[optidx].funcflags) != 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue