Fix undefined dereference in JSON decoding for relro

This commit is contained in:
pancake 2017-06-09 00:28:42 +02:00
parent 5931097b66
commit 9954f31a32

View File

@ -71,10 +71,11 @@ void Dashboard::updateContents()
this->ui->endianEdit->setText(item2["endian"].toString());
this->ui->compiledEdit->setText(item2["compiled"].toString());
this->ui->bitsEdit->setText(QString::number(item2["bits"].toDouble()));
QString relro=item2["relro"].toString().split(" ").at(0);
relro[0]=item2["relro"].toString().split(" ").at(0)[0].toUpper();
this->ui->relroEdit->setText(relro);
if (item2["relro"].isUndefined()) {
QString relro=item2["relro"].toString().split(" ").at(0);
relro[0]=relro[0].toUpper();
this->ui->relroEdit->setText(relro);
}
this->ui->baddrEdit->setText(QString::number(item2["baddr"].toDouble()));