mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
fix: Crashes and usability issues with the pattern tree filter
This commit is contained in:
@@ -29,9 +29,9 @@ namespace hex::plugin::visualizers {
|
||||
dataPoints.clear();
|
||||
lastPoint = { 0, 0 };
|
||||
|
||||
bitfield->forEachEntry(0, bitfield->getEntryCount(), [&](u64, pl::ptrn::Pattern *entry) {
|
||||
bitfield->forEachEntry(0, bitfield->getEntryCount(), [&](u64, const auto &entry) {
|
||||
size_t bitSize;
|
||||
if (const auto *bitfieldField = dynamic_cast<pl::ptrn::PatternBitfieldField*>(entry); bitfieldField != nullptr)
|
||||
if (const auto *bitfieldField = dynamic_cast<pl::ptrn::PatternBitfieldField*>(entry.get()); bitfieldField != nullptr)
|
||||
bitSize = bitfieldField->getBitSize();
|
||||
else
|
||||
bitSize = entry->getSize() * 8;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace hex::plugin::visualizers {
|
||||
height = u64(arguments[2].toUnsigned());
|
||||
|
||||
auto iterable = dynamic_cast<pl::ptrn::IIterable*>(pattern.get());
|
||||
iterable->forEachEntry(0, iterable->getEntryCount(), [&](u64, pl::ptrn::Pattern *entry) {
|
||||
iterable->forEachEntry(0, iterable->getEntryCount(), [&](u64, const auto &entry) {
|
||||
tableContent.push_back(entry->toString());
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user