If the value is a negative integer, TiXmlElement::QueryUnsignedAttribute cast it to unsigned and returns TIXML_SUCCESS. Therefore if the value is "-1", I was expecting to receive a TIXML_WRONG_TYPE result, but instead the methods returns TIXML_SUCCESS and sets the value to "0xFFFFFFFF" (if sizeof(int) = 4)
Is this a wanted behaviour? If it is not, attached you can find a very small patch that should fix this.
Log in to post a comment.