Browse Source

Added length check to prevent wrapping.

master
Łukasz Sowa 11 years ago
parent
commit
0f9f7089a5
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/xml.c

+ 1
- 1
src/xml.c View File

@@ -536,7 +536,7 @@ static struct xml_node* xml_parse_node(struct xml_parser* parser) {
}

/* If tag ends with `/' it's self closing, skip content lookup */
if ('/' == tag_open->buffer[tag_open->length - 1]) {
if (tag_open->length > 0 && '/' == tag_open->buffer[tag_open->length - 1]) {
/* Drop `/'
*/
--tag_open->length;


Loading…
Cancel
Save