Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Jan 21, 2024
1 parent a0cf365 commit 8ec2b45
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions source/extrainfo.ixx
Expand Up @@ -16,7 +16,7 @@ public:
{
CIniReader iniReader("");

auto bExraInfo = iniReader.ReadInteger("MISC", "ExraInfo", 1) != 0;
auto bExraInfo = iniReader.ReadInteger("MISC", "ExtraInfo", 1) != 0;

if (bExraInfo)
{
Expand All @@ -29,23 +29,26 @@ public:
{
static std::wstring extra = L"";
regs.eax += 0x78;
auto s = std::wstring_view((wchar_t*)regs.eax);

auto imgNum = 0;
auto imgArrSize = 0;
for (auto& it : *pCGameConfigReader__ms_imgFiles)
if (pCGameConfigReader__ms_imgFiles)
{
if (it.m_hFile != -1)
imgNum++;
imgArrSize++;
auto s = std::wstring_view((wchar_t*)regs.eax);
auto imgNum = 0;
auto imgArrSize = 0;
for (auto& it : *pCGameConfigReader__ms_imgFiles)
{
if (it.m_hFile != -1)
imgNum++;
imgArrSize++;
}
extra = s;
extra += L"~n~";
extra += L" ";
extra += L"IMG Files: " + std::to_wstring(imgNum) + L" / " + std::to_wstring(imgArrSize);
if (imgNum >= imgArrSize) extra += L"; WARNING: IMG Files limit reached!";

regs.eax = (uintptr_t)extra.c_str();
}
extra = s;
extra += L"~n~";
extra += L" ";
extra += L"IMG Files: " + std::to_wstring(imgNum) + L" / " + std::to_wstring(imgArrSize);
if (imgNum >= imgArrSize) extra += L"; WARNING: IMG Files limit reached!";

regs.eax = (uintptr_t)extra.c_str();
}
}; injector::MakeInline2<MS_PAUSED_HOOK>(pattern.get_first(0));
}
Expand Down

0 comments on commit 8ec2b45

Please sign in to comment.