1From ea453aca2742be6ac43ba4ce0da6f938a7e5a5d8 Mon Sep 17 00:00:00 2001 2From: He Liu <liulonnie@gmail.com> 3Date: Tue, 4 Feb 2014 11:00:40 -0800 4Subject: [PATCH] line comment bug 5 6--- 7 src/support.c | 4 +++- 8 1 file changed, 3 insertions(+), 1 deletion(-) 9 10diff --git a/src/support.c b/src/support.c 11index c57eaef..e3357e4 100644 12--- a/src/support.c 13+++ b/src/support.c 14@@ -188,7 +188,7 @@ static char * append_to_buffer( 15 size_t length 16 ) 17 { 18- if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memory */ 19+ if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate more memory */ 20 size_t size = MAX( BUF_INCR_SIZE, length); 21 22 if (mem_buf_p->buffer == NULL) { /* 1st append */ 23@@ -1722,6 +1722,8 @@ com_start: 24 sp -= 2; 25 while (*sp != '\n') /* Until end of line */ 26 mcpp_fputc( *sp++, OUT); 27+ mcpp_fputc('\n', OUT); 28+ wrong_line = TRUE; 29 } 30 goto end_line; 31 default: /* Not a comment */ 32-- 332.25.1 34 35