From 7a2767e6102f2f86b364f217805a7ed021e51ec2 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Tue, 27 Mar 2018 13:12:37 +0200 Subject: [PATCH] Make parse_units() handle trailing whitespace Skipping any trailing whitespace characters --- lib/roken/parse_units.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/roken/parse_units.c b/lib/roken/parse_units.c index d7233e960..5f6805f3c 100644 --- a/lib/roken/parse_units.c +++ b/lib/roken/parse_units.c @@ -135,6 +135,8 @@ parse_something (const char *s, const struct units *units, } if (*p == 's') ++p; + while(isspace((unsigned char)*p)) + ++p; } return res; }