Skip to content

Commit

Permalink
Fixed an incorrect parsing of comments
Browse files Browse the repository at this point in the history
  • Loading branch information
renecannao committed Feb 16, 2016
1 parent 79ab022 commit 4b93a74
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/c_tokenizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,15 @@ char *mysql_query_digest_and_first_comment(char *s, int _len, char **first_comme
if (*first_comment==NULL) {
*first_comment=(char *)malloc(FIRST_COMMENT_MAX_LENGTH);
}
*first_comment[fc_len]= !is_space_char(*s) ? *s : ' ';
char *c=*first_comment+fc_len;
*c = !is_space_char(*s) ? *s : ' ';
fc_len++;
}
if (prev_char == '*' && *s == '/') {
if (fc_len>=2) fc_len-=2;
*first_comment[fc_len]=0;
char *c=*first_comment+fc_len;
*c=0;
//*first_comment[fc_len]=0;
fc=2;
}
}
Expand Down

0 comments on commit 4b93a74

Please sign in to comment.