roughly expanded overlay pic buffer to 0x1000, and added some safety guardian to avoid crash .

This commit is contained in:
Zero Fanker 2024-03-26 23:21:54 -04:00
parent 172e67823d
commit a2117f8c25
2 changed files with 17 additions and 7 deletions

View file

@ -238,8 +238,15 @@ CString* CIniFileSection::GetValue(std::size_t index) noexcept
return NULL;
auto i = values.begin();
for (auto e = 0;e < index;e++)
for (auto e = 0; e < index; e++) {
if (i == values.end()) {
break;
}
i++;
}
if (i == values.end()) {
return nullptr;
}
return &i->second;
}