mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-07-17 19:56:38 -04:00
roughly expanded overlay pic buffer to 0x1000, and added some safety guardian to avoid crash .
This commit is contained in:
parent
172e67823d
commit
a2117f8c25
2 changed files with 17 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue