Debugger: Fix crash when showing characters > 0x7FFFFFFF

Change-Id: If9e1e235ea7b5288a29ca8f3a17e75dea3c57978
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Marcus Tillmanns
2022-08-11 13:40:43 +02:00
parent b3f1c73aef
commit e31d7b227e

View File

@@ -664,7 +664,7 @@ static QString reformatInteger(quint64 value, int format, int size, bool isSigne
// Format printable (char-type) characters
static QString reformatCharacter(int code, int size, bool isSigned)
{
if (code > 0xffff) {
if (uint32_t(code) > 0xffff) {
std::array<char, sizeof(char32_t)> buf;
memcpy(buf.data(), &code, sizeof(char32_t));
QByteArrayView view(buf);