Przeglądaj źródła

Added length check to prevent wrapping.

master
Łukasz Sowa 10 lat temu
rodzic
commit
0f9f7089a5
1 zmienionych plików z 1 dodań i 1 usunięć
  1. +1
    -1
      src/xml.c

+ 1
- 1
src/xml.c Wyświetl plik

@@ -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;


Ładowanie…
Anuluj
Zapisz