diff options
author | orbitcowboy <ettl.martin78@gmail.com> | 2014-12-16 21:16:48 +0100 |
---|---|---|
committer | orbitcowboy <ettl.martin78@gmail.com> | 2014-12-16 21:16:48 +0100 |
commit | 378fb0bacec858847734452c080afb30eb308d7a (patch) | |
tree | b84735f30006c753d6c98764f8c7a96a4cc530c3 /core/io | |
parent | c8b2a5f64a44484b566bc1e2aa12aa36850f107e (diff) |
xml_parser: check array length index before accessing the array.
Diffstat (limited to 'core/io')
-rw-r--r-- | core/io/xml_parser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/io/xml_parser.cpp b/core/io/xml_parser.cpp index 6306d22368..1d69f8e5e7 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; |