Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-105027

QByteArray::count(ch) reports wrong result for more than 2Gi occurrences

XMLWordPrintable

    • 1
    • 84e15f662e (qt/qtbase/dev) 84e15f662e (qt/tqtc-qtbase/dev)
    • Foundation Sprint 61

      This code fails on 64-bit platforms:

      const QByteArray b(qsizetype(INT_MAX) + 1, 'A');
      assert(b.count('A') == b.size());
      

      There's some truncation going on.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            mmutz Marc Mutz
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes