Skip to content

Commit

Permalink
line comment bug
Browse files Browse the repository at this point in the history
  • Loading branch information
h8liu committed Feb 4, 2014
1 parent 96b81a7 commit ea453ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/support.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ static char * append_to_buffer(
size_t length
)
{
if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memory */
if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate more memory */
size_t size = MAX( BUF_INCR_SIZE, length);

if (mem_buf_p->buffer == NULL) { /* 1st append */
Expand Down Expand Up @@ -1722,6 +1722,8 @@ static char * parse_line( void)
sp -= 2;
while (*sp != '\n') /* Until end of line */
mcpp_fputc( *sp++, OUT);
mcpp_fputc('\n', OUT);
wrong_line = TRUE;
}
goto end_line;
default: /* Not a comment */
Expand Down

0 comments on commit ea453ac

Please sign in to comment.