Fix file extraction in UEFIExtract

This commit is contained in:
vit9696 2018-10-10 23:32:58 +03:00
parent 126b36a672
commit 021da9df4c

View File

@ -93,9 +93,9 @@ USTATUS FfsDumper::recursiveDump(const UModelIndex & index, const UString & path
std::ofstream file(filename.toLocal8Bit(), std::ofstream::binary); std::ofstream file(filename.toLocal8Bit(), std::ofstream::binary);
if (!file) if (!file)
return U_FILE_OPEN; return U_FILE_OPEN;
const UByteArray &headerData = model->header(index); const UByteArray &headerData = model->header(fileIndex);
const UByteArray &bodyData = model->body(index); const UByteArray &bodyData = model->body(fileIndex);
const UByteArray &tailData = model->tail(index); const UByteArray &tailData = model->tail(fileIndex);
file.write(headerData.constData(), headerData.size()); file.write(headerData.constData(), headerData.size());
file.write(bodyData.constData(), bodyData.size()); file.write(bodyData.constData(), bodyData.size());
file.write(tailData.constData(), tailData.size()); file.write(tailData.constData(), tailData.size());