Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-2004

bit operation error in DOMNodeImpl::reverseTreeOrderBitPattern

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.1
    • 3.1.2, 3.2.0
    • DOM
    • None
    • any

    Description

      code like below:
      short DOMNodeImpl::reverseTreeOrderBitPattern(short pattern) const {
      if(pattern & DOMNode::DOCUMENT_POSITION_PRECEDING)

      { pattern &= !DOMNode::DOCUMENT_POSITION_PRECEDING; pattern |= DOMNode::DOCUMENT_POSITION_FOLLOWING; }

      I think it should be:
      short DOMNodeImpl::reverseTreeOrderBitPattern(short pattern) const {
      if(pattern & DOMNode::DOCUMENT_POSITION_PRECEDING)

      { pattern &= ~DOMNode::DOCUMENT_POSITION_PRECEDING; pattern |= DOMNode::DOCUMENT_POSITION_FOLLOWING; }

      because !DOMNode::DOCUMENT_POSITION_PRECEDING always be 0.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            amassari Alberto Massari
            zhuyadong 朱亚东
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment