Dolda2000 GitWeb
/
ashd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17e5513
)
Fixed config parsing bug.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Wed, 25 Aug 2010 00:03:53 +0000
(
02:03
+0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Wed, 25 Aug 2010 00:03:53 +0000
(
02:03
+0200)
lib/cf.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/cf.c
b/lib/cf.c
index
d0b1207
..
3314e4a
100644
(file)
--- a/
lib/cf.c
+++ b/
lib/cf.c
@@
-93,11
+93,13
@@
static int parsefile(struct cfstate *s, FILE *in)
line[0] = 0;
}
s->lno++;
- for(p = line + strlen(line) - 1; p >= line; p--) {
- if(isspace(*p))
- *p = 0;
- else
- break;
+ if(line[0]) {
+ for(p = line + strlen(line) - 1; p >= line; p--) {
+ if(isspace(*p))
+ *p = 0;
+ else
+ break;
+ }
}
for(ind = 0, p = line; *p; p++) {
if(*p == ' ') {