more stable character filter

This commit is contained in:
Blu3train 2023-04-18 21:38:36 +02:00
parent d9e4998119
commit 45bf759aa5

View File

@ -6354,15 +6354,15 @@ static bool InsertYuris2Hook()
static bool Yuris3Filter(LPVOID data, DWORD *size, HookParam *, BYTE) static bool Yuris3Filter(LPVOID data, DWORD *size, HookParam *, BYTE)
{ {
static bool bEven = false; static wchar_t prev_text;
static wchar_t even_text;
wchar_t* pText = reinterpret_cast<wchar_t*>(data); wchar_t* pText = reinterpret_cast<wchar_t*>(data);
if (bEven = !bEven) if (prev_text == *pText)
even_text = *pText; {
else prev_text = '\0';
if (even_text == *pText) return false;
return false; }
prev_text = *pText;
return true; return true;
} }