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>
This commit is contained in:
Edward Welbourne 2025-05-16 15:50:58 +02:00
parent b268177bf8
commit 578852f4ca

View File

@ -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);