Skip to content

Commit 8ec2b45

Browse files
committed
fix typo
1 parent a0cf365 commit 8ec2b45

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

source/extrainfo.ixx

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public:
1616
{
1717
CIniReader iniReader("");
1818

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

2121
if (bExraInfo)
2222
{
@@ -29,23 +29,26 @@ public:
2929
{
3030
static std::wstring extra = L"";
3131
regs.eax += 0x78;
32-
auto s = std::wstring_view((wchar_t*)regs.eax);
3332

34-
auto imgNum = 0;
35-
auto imgArrSize = 0;
36-
for (auto& it : *pCGameConfigReader__ms_imgFiles)
33+
if (pCGameConfigReader__ms_imgFiles)
3734
{
38-
if (it.m_hFile != -1)
39-
imgNum++;
40-
imgArrSize++;
35+
auto s = std::wstring_view((wchar_t*)regs.eax);
36+
auto imgNum = 0;
37+
auto imgArrSize = 0;
38+
for (auto& it : *pCGameConfigReader__ms_imgFiles)
39+
{
40+
if (it.m_hFile != -1)
41+
imgNum++;
42+
imgArrSize++;
43+
}
44+
extra = s;
45+
extra += L"~n~";
46+
extra += L" ";
47+
extra += L"IMG Files: " + std::to_wstring(imgNum) + L" / " + std::to_wstring(imgArrSize);
48+
if (imgNum >= imgArrSize) extra += L"; WARNING: IMG Files limit reached!";
49+
50+
regs.eax = (uintptr_t)extra.c_str();
4151
}
42-
extra = s;
43-
extra += L"~n~";
44-
extra += L" ";
45-
extra += L"IMG Files: " + std::to_wstring(imgNum) + L" / " + std::to_wstring(imgArrSize);
46-
if (imgNum >= imgArrSize) extra += L"; WARNING: IMG Files limit reached!";
47-
48-
regs.eax = (uintptr_t)extra.c_str();
4952
}
5053
}; injector::MakeInline2<MS_PAUSED_HOOK>(pattern.get_first(0));
5154
}

0 commit comments

Comments
 (0)