diff options
| author | Edward Welbourne <edward.welbourne@qt.io> | 2025-05-16 15:50:58 +0200 |
|---|---|---|
| committer | Edward Welbourne <edward.welbourne@qt.io> | 2025-05-22 20:37:35 +0200 |
| commit | 578852f4cab3a24677a05c3a9e0349d0e9ba2402 (patch) | |
| tree | 39ef31575c8d372e950fd7d2f79ef062c597ec2e /src/corelib/io/qdebug.cpp | |
| parent | b268177bf88179a41f7069c344af853284db6032 (diff) | |
Correct two misleading comments
Of course ucs4 >> 32 would be zero, as it's only a 32-bit value to
begin with; and the pattern of later bytes actually processed makes
quite clear what offsets the two short-cut ones really come from.
Brought to light while reviewing assessment of security level.
Task-number: QTBUG-135187
Change-Id: I8af6b5c935de400f3ac1c2efae297b0333891d64
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qdebug.cpp')
| -rw-r--r-- | src/corelib/io/qdebug.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp index 4600b8ee99e..e1f5035d9c0 100644 --- a/src/corelib/io/qdebug.cpp +++ b/src/corelib/io/qdebug.cpp @@ -276,8 +276,8 @@ static inline void putEscapedString(QTextStreamPrivate *d, const Char *begin, si buflen = 2; } else { buf[1] = 'U'; - buf[2] = '0'; // toHexUpper(ucs4 >> 32); - buf[3] = '0'; // toHexUpper(ucs4 >> 28); + buf[2] = '0'; // toHexUpper(ucs4 >> 28); + buf[3] = '0'; // toHexUpper(ucs4 >> 24); buf[4] = toHexUpper(ucs4 >> 20); buf[5] = toHexUpper(ucs4 >> 16); buf[6] = toHexUpper(ucs4 >> 12); |
