1
0
Fork 0

fix issue 1127 (#1130)

* fix issue 1127

* fix issue 1127
This commit is contained in:
Torusrxxx 2016-09-30 16:01:09 +00:00 committed by Duncan Ogilvie
parent cf5e148e9d
commit 84cf8fc9fe
1 changed files with 4 additions and 4 deletions

View File

@ -611,13 +611,13 @@ void EditFloatRegister::editingHex1FinishedSlot(QString arg)
QString filled(arg.toUpper());
if(ConfigBool("Gui", "FpuRegistersLittleEndian"))
{
filled.append(QString(16 - filled.length(), QChar('0')));
filled.append(QString(32 - filled.length(), QChar('0')));
for(int i = 0; i < 16; i++)
Data[i + 16] = filled.mid(i * 2, 2).toInt(0, 16);
}
else
{
filled.prepend(QString(16 - filled.length(), QChar('0')));
filled.prepend(QString(32 - filled.length(), QChar('0')));
for(int i = 0; i < 16; i++)
Data[i + 16] = filled.mid(30 - i * 2, 2).toInt(0, 16);
}
@ -639,13 +639,13 @@ void EditFloatRegister::editingHex2FinishedSlot(QString arg)
maxBytes = RegSize / 8;
if(ConfigBool("Gui", "FpuRegistersLittleEndian"))
{
filled.append(QString(maxBytes - filled.length(), QChar('0')));
filled.append(QString(maxBytes * 2 - filled.length(), QChar('0')));
for(int i = 0; i < maxBytes; i++)
Data[i] = filled.mid(i * 2, 2).toInt(0, 16);
}
else
{
filled.prepend(QString(maxBytes - filled.length(), QChar('0')));
filled.prepend(QString(maxBytes * 2 - filled.length(), QChar('0')));
for(int i = 0; i < maxBytes; i++)
Data[i] = filled.mid((maxBytes - i - 1) * 2, 2).toInt(0, 16);
}