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

SetScrollRange incorrectly checks for overflow

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 0.4.5
    • Component/s: Win32SS
    • Labels:

      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

            • Assignee:
              ThFabba Thomas Faber
              Reporter:
              ThFabba Thomas Faber
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: