summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2022-08-01 12:29:22 -0300
committermrb0nk500 <b0nk@b0nk.xyz>2022-08-01 12:31:40 -0300
commit5589b9898b0bd9bbdfdf3c78c532e9bb104d5c41 (patch)
tree2e4276c410d9dbff9d5433b30d4f1ca68a356dce
parent262a5fa99b1a807050bcaf592a533b30107af6be (diff)
keyword: Remove trailing whitespace from the right hand side in
`parse_key_value_file()`
-rw-r--r--keyword.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/keyword.c b/keyword.c
index 2afe455..d810f3c 100644
--- a/keyword.c
+++ b/keyword.c
@@ -115,6 +115,8 @@ int parse_key_value_file(void *ret, void *ctx, const keyword **keywords, char *b
} else {
/* Get the rest of the line. */
rhs = strtok_r(tmp, "\n", &buf);
+ /* Remove any whitespace ahead of us. */
+ rhs = strtok_r(rhs, " \t\v\r\n", &tmp);
}
/* Did we fail to parse the keyword? */