Truncated focused memory regions in value annotations, when configured as signed integers and the size exceeds 8 bytes.

This commit is contained in:
Nav
2022-02-02 22:37:40 +00:00
parent d23277f4ab
commit 6d9b29d1bc

View File

@@ -72,15 +72,13 @@ void ValueAnnotationItem::refreshLabelText() {
break; break;
} }
if (valueSize <= 8) { std::int64_t integerValue = 0;
std::int64_t integerValue = 0; for (const auto& byte : this->value) {
for (const auto& byte : this->value) { integerValue = (integerValue << 8) | byte;
integerValue = (integerValue << 8) | byte;
}
this->labelText = QString::number(integerValue);
break;
} }
this->labelText = QString::number(integerValue);
break;
} }
case MemoryRegionDataType::ASCII_STRING: { case MemoryRegionDataType::ASCII_STRING: {
// Replace non-ASCII chars with '?' // Replace non-ASCII chars with '?'