summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormurray <murray@FreeBSD.org>2000-11-09 00:28:22 +0000
committermurray <murray@FreeBSD.org>2000-11-09 00:28:22 +0000
commit3ef76bcdb5148e5d475bab2c2ad09c5609185456 (patch)
treefcb55f6772290862aecce70788977ad395b24fbb /lib
parent7e3691b30c4894e6d7164fdecacef26692068f25 (diff)
downloadFreeBSD-src-3ef76bcdb5148e5d475bab2c2ad09c5609185456.zip
FreeBSD-src-3ef76bcdb5148e5d475bab2c2ad09c5609185456.tar.gz
Eliminate inconsistency where a value that contains only whitespace
confuses the parser. Approved by: jkh
Diffstat (limited to 'lib')
-rw-r--r--lib/libutil/property.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libutil/property.c b/lib/libutil/property.c
index ba8eef9..91189d9 100644
--- a/lib/libutil/property.c
+++ b/lib/libutil/property.c
@@ -133,7 +133,12 @@ properties_read(int fd)
break;
case VALUE:
- if (v == 0 && isspace(ch))
+ if (v == 0 && ch == '\n') {
+ hold_v[v] = '\0';
+ v = n = 0;
+ state = COMMIT;
+ }
+ else if (v == 0 && isspace(ch))
continue;
else if (ch == '{') {
state = MVALUE;
OpenPOWER on IntegriCloud