From 89473d417cd2329f06fe5468599da51c4d3389d4 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Wed, 21 Jun 2023 01:07:14 -0700 Subject: [PATCH] We no longer read invalid tags or lone tags. --- Crawler/TMXParser.h | 6 ++++++ Crawler/Version.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Crawler/TMXParser.h b/Crawler/TMXParser.h index 9f487f95..110eb9a6 100644 --- a/Crawler/TMXParser.h +++ b/Crawler/TMXParser.h @@ -163,6 +163,12 @@ public: if (data[0]=='<') { //Beginning of XML tag. accumulator=data; + if(accumulator.length()>1&&accumulator.at(1)=='/'){ + accumulator=""; //Restart because this is an end tag. + } + if(accumulator.length()>1&&accumulator.find('>')!=std::string::npos){ + accumulator=""; //Restart because this tag has nothing in it! + } } else { //Start reading in data for this layer. std::vectorrowData; diff --git a/Crawler/Version.h b/Crawler/Version.h index b8e02bc8..50b1068b 100644 --- a/Crawler/Version.h +++ b/Crawler/Version.h @@ -2,7 +2,7 @@ #define VERSION_MAJOR 0 #define VERSION_MINOR 2 #define VERSION_PATCH 0 -#define VERSION_BUILD 98 +#define VERSION_BUILD 100 #define stringify(a) stringify_(a) #define stringify_(a) #a