Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #6 from afwn90cj93201nixr2e1re/Fix
Browse files Browse the repository at this point in the history
Lil fix for 8245 build
  • Loading branch information
Garey27 authored May 31, 2019
2 parents e3ebda9 + 27d8ec6 commit 1203663
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions MiniBase/colorconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ void ColorChatConsolePrint(char string[512])
BYTE Cvar_R, Cvar_G, Cvar_B;
BYTE R, G, B;
sscanf_s(pszColor, "%hhi %hhi %hhi", &Cvar_R, &Cvar_G, &Cvar_B);
if (g_sayTextLine[0].m_textRanges.Size() != 0)
if (g_sayTextLine[0].m_textRanges.Count() != 0)
{
for (rangeIndex = 0; rangeIndex < g_sayTextLine[0].m_textRanges.Size(); rangeIndex++)
for (rangeIndex = 0; rangeIndex < g_sayTextLine[0].m_textRanges.Count(); rangeIndex++)
{
range = &g_sayTextLine[0].m_textRanges[rangeIndex];
if (range->color) {
Expand All @@ -81,8 +81,8 @@ void SearchPrintConsole()

if (PatternAddress)
{
size_t addref = (size_t)&pg_sayTextLine;
*(size_t *)addref = *(DWORD*)(PatternAddress - 0x63);
pg_sayTextLine = reinterpret_cast<decltype(pg_sayTextLine)>(*(DWORD*)offset.FindPattern("\x66\x39\x1D\xFF\xFF\xFF\xFF\x55", "xxx????x", offset.ClBase, offset.ClEnd, 0x3));

DWORD oldProt;
VirtualProtect(LPVOID(PatternAddress - 1), 6, PAGE_EXECUTE_READWRITE, &oldProt);
*(uint8_t *)(PatternAddress - 1) = 0x90; // NOP
Expand Down

0 comments on commit 1203663

Please sign in to comment.