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--- 7Upstream-Status: Pending 8 9 src/support.c | 4 +++- 10 1 file changed, 3 insertions(+), 1 deletion(-) 11 12diff --git a/src/support.c b/src/support.c 13index c57eaef..e3357e4 100644 14--- a/src/support.c 15+++ b/src/support.c 16@@ -188,7 +188,7 @@ static char * append_to_buffer( 17 size_t length 18 ) 19 { 20- if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memory */ 21+ if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate more memory */ 22 size_t size = MAX( BUF_INCR_SIZE, length); 23 24 if (mem_buf_p->buffer == NULL) { /* 1st append */ 25@@ -1722,6 +1722,8 @@ com_start: 26 sp -= 2; 27 while (*sp != '\n') /* Until end of line */ 28 mcpp_fputc( *sp++, OUT); 29+ mcpp_fputc('\n', OUT); 30+ wrong_line = TRUE; 31 } 32 goto end_line; 33 default: /* Not a comment */ 34-- 352.25.1 36 37