Revert wrbuf_puts behavior to 2.1.54
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 6 Nov 2009 13:18:43 +0000 (14:18 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 6 Nov 2009 13:18:43 +0000 (14:18 +0100)
src/wrbuf.c

index 01532c7..497a669 100644 (file)
@@ -81,7 +81,8 @@ int wrbuf_write(WRBUF b, const char *buf, int size)
 
 int wrbuf_puts(WRBUF b, const char *buf)
 {
-    wrbuf_write(b, buf, strlen(buf));
+    wrbuf_write(b, buf, strlen(buf) + 1);
+    (b->pos)--;           /* don't include '\0' in count */
     return 0;
 }