Skip to content

Commit

Permalink
Merge pull request #13 from ramok0/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
kem0x authored Apr 12, 2024
2 parents b912694 + e2d7de0 commit 49e3b66
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion memcury.h
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ namespace Memcury

// Supports wide and normal strings both std and pointers
template <typename T = const wchar_t*>
static auto FindStringRef(T string) -> Scanner
static auto FindStringRef(T string, bool find_first = false) -> Scanner
{
PE::Address add { nullptr };

Expand Down Expand Up @@ -788,6 +788,8 @@ namespace Memcury
if (leaT == string)
{
add = PE::Address(&scanBytes[i]);
if(find_first)
break;
}
}
else
Expand All @@ -799,13 +801,17 @@ namespace Memcury
if (wcscmp(string, lea) == 0)
{
add = PE::Address(&scanBytes[i]);
if(find_first)
break;
}
}
else
{
if (strcmp(string, lea) == 0)
{
add = PE::Address(&scanBytes[i]);
if(find_first)
break;
}
}
}
Expand Down

0 comments on commit 49e3b66

Please sign in to comment.