diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-19 22:15:58 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-19 22:15:58 +0000 |
commit | 77d2929512ff62e421e9bfee659cc86973fc7df7 (patch) | |
tree | eaeaee2b6f7ef7498cc5aa12b340b11cb125638b /plugins/MirOTR/ekhtml/src/ekhtml_comment.c | |
parent | 665935b0f99a4b9585f9afe9c9730931a3c94f85 (diff) |
files structure reorganization
git-svn-id: http://svn.miranda-ng.org/main/trunk@492 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR/ekhtml/src/ekhtml_comment.c')
-rw-r--r-- | plugins/MirOTR/ekhtml/src/ekhtml_comment.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/MirOTR/ekhtml/src/ekhtml_comment.c b/plugins/MirOTR/ekhtml/src/ekhtml_comment.c index 11c4e8cf2e..e37cc487b5 100644 --- a/plugins/MirOTR/ekhtml/src/ekhtml_comment.c +++ b/plugins/MirOTR/ekhtml/src/ekhtml_comment.c @@ -66,22 +66,22 @@ char *ekhtml_parse_comment(ekhtml_parser_t *parser, void **state_data, if(comstate->dashes == 0){ /* Still on the quest for the double dash*/ /* XXX -- Searching for '--' could be faster, doing multibyte searching, or something similar */ - for (; workp < endp - 1; workp += 2){ - if (*workp == '-') + for(; workp < endp - 1; workp += 2){ + if(*workp == '-') break; } - if (!(workp < endp - 1)) { + if(!(workp < endp - 1)){ *offset = endp - 1 - curp; return NULL; } - if ((*(workp - 1) == '-') && + if((*(workp - 1) == '-') && (workp - curp) > (sizeof("<!--") - 1)) { comstate->lastdash = workp - 1 - curp; comstate->dashes = 1; - } else if (*(workp + 1) == '-') { + } else if(*(workp + 1) == '-'){ comstate->lastdash = workp - curp; comstate->dashes = 1; } else { @@ -99,7 +99,7 @@ char *ekhtml_parse_comment(ekhtml_parser_t *parser, void **state_data, return NULL; } - if (*workp == '>') { + if(*workp == '>'){ if(parser->commentcb){ ekhtml_string_t str; |