fix pattern stuff
This commit is contained in:
parent
b7fe2026cd
commit
a4ab956477
@ -78,7 +78,8 @@ static InitFunction PokkenFunc([]()
|
|||||||
|
|
||||||
for (auto cha : chars)
|
for (auto cha : chars)
|
||||||
{
|
{
|
||||||
auto patterns = hook::pattern(va("%02X 3A 5C", cha));
|
std::string pat = va("%02X 3A 5C", cha);
|
||||||
|
auto patterns = hook::pattern(pat);
|
||||||
|
|
||||||
if (patterns.size() > 0)
|
if (patterns.size() > 0)
|
||||||
{
|
{
|
||||||
|
@ -1280,7 +1280,8 @@ static InitFunction Wmmt5Func([]()
|
|||||||
|
|
||||||
for (auto cha : chars)
|
for (auto cha : chars)
|
||||||
{
|
{
|
||||||
auto patterns = hook::pattern(va("%02X 3A 2F", cha));
|
std::string pat = va("%02X 3A 2F", cha);
|
||||||
|
auto patterns = hook::pattern(pat);
|
||||||
|
|
||||||
if (patterns.size() > 0)
|
if (patterns.size() > 0)
|
||||||
{
|
{
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable:4201)
|
#pragma warning(disable:4201)
|
||||||
@ -91,6 +92,13 @@ namespace hook
|
|||||||
Initialize(pattern, Len);
|
Initialize(pattern, Len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pattern(std::string &pattern)
|
||||||
|
: pattern(GetModuleHandle(NULL))
|
||||||
|
{
|
||||||
|
auto len = pattern.length();
|
||||||
|
Initialize(pattern.c_str(), len);
|
||||||
|
}
|
||||||
|
|
||||||
inline pattern& count(uint32_t expected) &
|
inline pattern& count(uint32_t expected) &
|
||||||
{
|
{
|
||||||
EnsureMatches(expected);
|
EnsureMatches(expected);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user