diff options
-rw-r--r-- | src/cmd/plumb/rules.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/plumb/rules.c b/src/cmd/plumb/rules.c index 4da4bb23..6e9b2c63 100644 --- a/src/cmd/plumb/rules.c +++ b/src/cmd/plumb/rules.c @@ -736,8 +736,8 @@ morerules(uchar *text, int done) */ endofrule = nil; for(s=text; *s!='\0'; s++) - if(*s=='\n' && *++s=='\n') - endofrule = s+1; + if(*s=='\n' && *(s+1)=='\n') + endofrule = s+2; if(endofrule == nil) return text; input->end = endofrule; @@ -772,7 +772,7 @@ writerules(char *s, int n) tmp = stringof(s, n); text = (uchar*)concat((char*)text, tmp); free(tmp); - text = morerules(text, s==nil); + text = morerules(text, n==0); } if(s == nil){ free(text); |