Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion UEFIFind/uefifind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ USTATUS UEFIFind::findFileRecursive(const UModelIndex index, const UString & hex

// For patterns that cross header|body boundary, skip patterns entirely located in body, since
// children search above has already found them.
if (hasChildren && mode == SEARCH_MODE_ALL && offset >= model->header(index).size()) {
if (hasChildren && mode == SEARCH_MODE_ALL && offset >= model->headerSize(index)) {
offset = -1;
}

Expand Down
2 changes: 1 addition & 1 deletion UEFITool/QHexView/src/qhexview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ void QHexView::checkState() {

int doclines = static_cast<int>(this->lines()),
vislines = this->visibleLines(true);
qint64 vscrollmax = doclines - vislines + 1; // UEFITool: ensure the very last line is visible on macOS
qint64 vscrollmax = doclines - vislines;
if(doclines >= vislines)
vscrollmax++;

Expand Down
9 changes: 6 additions & 3 deletions UEFITool/ffsfinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

#include "ffsfinder.h"
#include "../common/utility.h"

#if QT_VERSION_MAJOR >= 6
#include <QRegularExpression>
Expand All @@ -36,7 +37,8 @@ USTATUS FfsFinder::findHexPattern(const UModelIndex & index, const UByteArray &
return U_INVALID_PARAMETER;

// Check for "all substrings" pattern
if (hexPattern.count('.') == hexPattern.length())
auto c = checkSingle(hexPattern);
if (c == '.')
return U_SUCCESS;

USTATUS ret = U_ITEM_NOT_FOUND;
Expand Down Expand Up @@ -78,7 +80,7 @@ USTATUS FfsFinder::findHexPattern(const UModelIndex & index, const UByteArray &
if (offset % 2 == 0) {
// For patterns that cross header|body boundary, skip patterns entirely located in body, since
// children search above has already found them.
if (!(hasChildren && mode == SEARCH_MODE_ALL && offset/2 >= model->header(index).size())) {
if (!(hasChildren && mode == SEARCH_MODE_ALL && offset/2 >= model->headerSize(index))) {
UModelIndex parentFileIndex = model->findParentOfType(index, Types::File);
UString name = model->name(index);
if (model->parent(index) == parentFileIndex) {
Expand Down Expand Up @@ -165,7 +167,8 @@ USTATUS FfsFinder::findGuidPattern(const UModelIndex & index, const UByteArray &
hexPattern.append(list.at(3)).append(list.at(4));

// Check for "all substrings" pattern
if (hexPattern.count('.') == hexPattern.length())
auto c = checkSingle(hexPattern);
if (c == '.')
return U_SUCCESS;

#if QT_VERSION_MAJOR >= 6
Expand Down
Loading