Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-12763

SetScrollRange incorrectly checks for overflow

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 0.4.5
    • Win32SS

    Description

      if ((nMaxPos - nMinPos) > MAXLONG)
      {
         SetLastError(ERROR_INVALID_SCROLLBAR_RANGE);
         return FALSE;
      }

      CID 731535 (#1 of 1): Operands don't affect result (CONSTANT_EXPRESSION_RESULT)result_independent_of_operands: nMaxPos - nMinPos > 2147483647 is always false regardless of the values of its operands. This occurs as the logical operand of if.

      Attachments

        Activity

          People

            ThFabba ThFabba
            ThFabba ThFabba
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: