Improve firmware parser and tool robustness

closes #241
This commit is contained in:
joevt 2021-10-07 18:51:39 +03:00 committed by vit9696
parent e14547c497
commit f9c35f77a6
41 changed files with 415 additions and 324 deletions

View file

@ -14,11 +14,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "treeitem.h"
#include "types.h"
TreeItem::TreeItem(const UINT32 offset, const UINT8 type, const UINT8 subtype,
TreeItem::TreeItem(const UINT32 offset, const UINT8 type, const UINT8 subtype,
const UString & name, const UString & text, const UString & info,
const UByteArray & header, const UByteArray & body, const UByteArray & tail,
const bool fixed, const bool compressed,
TreeItem *parent) :
TreeItem *parent) :
itemOffset(offset),
itemAction(Actions::NoAction),
itemType(type),
@ -94,8 +94,8 @@ int TreeItem::row() const
}
TreeItem* TreeItem::child(int row)
{
std::list<TreeItem*>::iterator child = childItems.begin();
std::advance(child, row);
return *child;
{
std::list<TreeItem*>::iterator child = childItems.begin();
std::advance(child, row);
return *child;
}