Fix issue in sign-extension of memoryDisplayDelegate
We display the values at an address as byte-sized values. MemoryDisplayDelegate previously did not sign-extend the byte, and thus would never display negative (byte-sized) numbers.
MODIFY
src/memorydisplaydelegate.cpp
src/memorydisplaydelegate.cpp
#include "memorydisplaydelegate.h"
+#include "binutils.h"
MemoryDisplayDelegate::MemoryDisplayDelegate(QWidget* parent) : QStyledItemDelegate(parent) {}
@@ -19,7 +20,7 @@ QString MemoryDisplayDelegate::displayText(const QVariant& value, const QLocale&
retVal.setNum(value.toUInt());
break;
case displayTypeN::Decimal:
- retVal.setNum(value.toInt());
+ retVal.setNum(signextend<int, 8>(value.toInt()));
break;
case displayTypeN::ASCII:
retVal = QChar(value.toInt());

Fix issue in sign-extension of memoryDisplayDelegate

We display the values at an address as byte-sized values. MemoryDisplayDelegate previously did not sign-extend the byte, and thus would never display negative (byte-sized) numbers.