mirror of https://github.com/PCSX2/pcsx2.git
Debugger: Create check for successful QString conversion in MemoryViewerWidget.cpp
This commit is contained in:
parent
dccba86dde
commit
88672dc38f
|
@ -277,9 +277,11 @@ bool MemoryViewTable::KeyPress(int key, QChar keychar)
|
||||||
|
|
||||||
if (keyCharIsText)
|
if (keyCharIsText)
|
||||||
{
|
{
|
||||||
InsertIntoSelectedHexView(((u8)QString(QChar(key)).toInt(&pressHandled, 16)));
|
// Check if key pressed is hex before insertion (QString conversion fails otherwise)
|
||||||
|
const u8 keyPressed = (u8)QString(QChar(key)).toInt(&pressHandled, 16);
|
||||||
if (pressHandled)
|
if (pressHandled)
|
||||||
{
|
{
|
||||||
|
InsertIntoSelectedHexView(keyPressed);
|
||||||
// Increment to the next nibble or byte
|
// Increment to the next nibble or byte
|
||||||
if ((selectedNibbleHI = !selectedNibbleHI))
|
if ((selectedNibbleHI = !selectedNibbleHI))
|
||||||
UpdateSelectedAddress(selectedAddress + 1);
|
UpdateSelectedAddress(selectedAddress + 1);
|
||||||
|
|
Loading…
Reference in New Issue