Corrected tail append on extraction

This commit is contained in:
Nikolaj Schlej 2015-10-01 08:53:19 +02:00
parent 2d33206d29
commit 41e3ccf692
2 changed files with 5 additions and 2 deletions

View File

@ -85,7 +85,7 @@ STATUS FfsOperations::extract(const QModelIndex & index, QString & name, QByteAr
// Handle file tail
if (model->type(index) == Types::File) {
if (pdata.file.hasTail)
extracted.append(pdata.file.tail);
extracted.append(pdata.file.tailArray[0]).append(pdata.file.tailArray[1]);
}
}
else if (mode == EXTRACT_MODE_BODY) {

View File

@ -43,7 +43,10 @@ typedef struct _VOLUME_PARSING_DATA {
//} FREE_SPACE_PARSING_DATA;
typedef struct _FILE_PARSING_DATA {
UINT16 tail;
union {
UINT8 tailArray[2];
UINT16 tail;
};
BOOLEAN hasTail;
} FILE_PARSING_DATA;