mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-22 07:58:22 +08:00
parent
e0750a7b68
commit
49190d04dd
@ -17,7 +17,7 @@
|
||||
UEFITool::UEFITool(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::UEFITool),
|
||||
version(tr("0.30.0_alpha13"))
|
||||
version(tr("0.30.0_alpha15"))
|
||||
{
|
||||
clipboard = QApplication::clipboard();
|
||||
|
||||
@ -110,6 +110,7 @@ void UEFITool::init()
|
||||
ui->fitTableWidget->setRowCount(0);
|
||||
ui->fitTableWidget->setColumnCount(0);
|
||||
ui->infoEdit->clear();
|
||||
ui->messagesTabWidget->setTabEnabled(2, false);
|
||||
|
||||
// Set window title
|
||||
this->setWindowTitle(tr("UEFITool %1").arg(version));
|
||||
@ -673,7 +674,6 @@ void UEFITool::openImageFile(QString path)
|
||||
showFitTable();
|
||||
}
|
||||
|
||||
|
||||
// Enable search ...
|
||||
if (ffsFinder)
|
||||
delete ffsFinder;
|
||||
@ -891,8 +891,11 @@ void UEFITool::writeSettings()
|
||||
void UEFITool::showFitTable()
|
||||
{
|
||||
QVector<QVector<QString> > fitTable = fitParser->getFitTable();
|
||||
if (fitTable.isEmpty())
|
||||
if (fitTable.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
// Enable FIT tab
|
||||
ui->messagesTabWidget->setTabEnabled(2, true);
|
||||
|
||||
// Set up the FIT table
|
||||
ui->fitTableWidget->clear();
|
||||
|
@ -267,11 +267,18 @@ STATUS FfsParser::parseIntelImage(const QByteArray & intelImage, const UINT32 pa
|
||||
return ERR_INVALID_FLASH_DESCRIPTOR;
|
||||
}
|
||||
biosBegin = meEnd;
|
||||
}
|
||||
|
||||
bios = intelImage.mid(biosBegin, biosEnd);
|
||||
// biosEnd will point to the end of the image file
|
||||
// it may be wrong, but it's pretty hard to detect a padding after BIOS region
|
||||
// with malformed descriptor
|
||||
}
|
||||
// Normal descriptor map
|
||||
else {
|
||||
bios = intelImage.mid(biosBegin, biosEnd);
|
||||
// Calculate biosEnd
|
||||
biosEnd += biosBegin;
|
||||
}
|
||||
}
|
||||
else {
|
||||
msg(tr("parseIntelImage: descriptor parsing failed, BIOS region not found in descriptor"));
|
||||
return ERR_INVALID_FLASH_DESCRIPTOR;
|
||||
|
Loading…
Reference in New Issue
Block a user