From 851dd713c3a7580c5d51e45ff8dbb28553d1789e Mon Sep 17 00:00:00 2001 From: tm512 Date: Tue, 4 Jul 2017 17:17:39 -0700 Subject: [PATCH] Check whether is empty, so that it doesn't just loop through the rest of the file. --- src/tmx_xml.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tmx_xml.c b/src/tmx_xml.c index c8523b8..476334b 100755 --- a/src/tmx_xml.c +++ b/src/tmx_xml.c @@ -587,6 +587,8 @@ static int parse_tile(xmlTextReaderPtr reader, tmx_tileset *tileset, const char if (!parse_image(reader, &(res->image), 0, filename)) return 0; } else if (!strcmp(name, "objectgroup")) { /* tile collision */ + if (xmlTextReaderIsEmptyElement(reader)) continue; + do { if (xmlTextReaderRead(reader) != 1) return 0; /* error_handler has been called */ name = (char*)xmlTextReaderConstName(reader);