diff options
author | murray <murray@FreeBSD.org> | 2000-11-09 00:28:22 +0000 |
---|---|---|
committer | murray <murray@FreeBSD.org> | 2000-11-09 00:28:22 +0000 |
commit | 3ef76bcdb5148e5d475bab2c2ad09c5609185456 (patch) | |
tree | fcb55f6772290862aecce70788977ad395b24fbb /lib/libutil/property.c | |
parent | 7e3691b30c4894e6d7164fdecacef26692068f25 (diff) | |
download | FreeBSD-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/libutil/property.c')
-rw-r--r-- | lib/libutil/property.c | 7 |
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; |