diff --git a/include/SAX/helpers/AttributesImpl.hpp b/include/SAX/helpers/AttributesImpl.hpp index 434d264d..a5442ce2 100644 --- a/include/SAX/helpers/AttributesImpl.hpp +++ b/include/SAX/helpers/AttributesImpl.hpp @@ -188,7 +188,7 @@ public: { typename AttrList::const_iterator a = std::find_if(attributes_.begin(), attributes_.end(), AttributeNamed(uri, localName)); if(a != attributes_.end()) - return static_cast(std::distance(a, attributes_.end())); + return static_cast(std::distance(attributes_.begin(), a)); return -1; } // getIndex