mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-02-20 12:48:57 -06:00
fix: String search not including string at end of data (#963)
Before:  After: 
This commit is contained in:
@@ -253,6 +253,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
size_t countedCharacters = 0;
|
||||
u64 startAddress = reader.begin().getAddress();
|
||||
u64 endAddress = reader.end().getAddress();
|
||||
for (u8 byte : reader) {
|
||||
bool validChar =
|
||||
(settings.m_lowerCaseLetters && std::islower(byte)) ||
|
||||
@@ -275,7 +276,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
if (validChar)
|
||||
countedCharacters++;
|
||||
else {
|
||||
if (!validChar || startAddress + countedCharacters == endAddress) {
|
||||
if (countedCharacters >= size_t(settings.minLength)) {
|
||||
if (!(settings.nullTermination && byte != 0x00)) {
|
||||
results.push_back(Occurrence { Region { startAddress, countedCharacters }, decodeType, endian });
|
||||
|
||||
Reference in New Issue
Block a user