From 378fb0bacec858847734452c080afb30eb308d7a Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Tue, 16 Dec 2014 21:16:48 +0100 Subject: [PATCH] xml_parser: check array length index before accessing the array. --- core/io/xml_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/io/xml_parser.cpp b/core/io/xml_parser.cpp index 6306d22368b..1d69f8e5e78 100644 --- a/core/io/xml_parser.cpp +++ b/core/io/xml_parser.cpp @@ -34,7 +34,7 @@ VARIANT_ENUM_CAST(XMLParser::NodeType); static bool _equalsn(const CharType* str1, const CharType* str2, int len) { int i; - for(i=0; str1[i] && str2[i] && i < len; ++i) + for(i=0; i < len && str1[i] && str2[i] ; ++i) if (str1[i] != str2[i]) return false;