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

Minor QByteArray::toBase64 improvement

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P4: Low
    • None
    • 5.1.0
    • None
    • c6aa76122e209350b8a7b3cb8b5bc8127a3722e7

    Description

      While researching a bug, I came across a minor issue in QByteArray::toBase64. The size calculation overcalculates the size required for the output by up to 3 Bytes.

      The code in the patch calculates the size properly, and removes the truncate() because it's now unnecessary.

      And the usual disclaimer: the code I added is public domain, I disclaim any ownership or copyright.

      Attachments

        Activity

          People

            maxlor Benjamin Lutz
            maxlor Benjamin Lutz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: