mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r14257) -Fix (r14153): incorrect update of ini-file group tail pointer causing memory corruption.
This commit is contained in:
parent
a42bef612e
commit
466e7740d7
@ -124,9 +124,10 @@ void IniFile::RemoveGroup(const char *name)
|
|||||||
|
|
||||||
if (prev != NULL) {
|
if (prev != NULL) {
|
||||||
prev->next = prev->next->next;
|
prev->next = prev->next->next;
|
||||||
|
if (this->last_group == &group->next) this->last_group = &prev->next;
|
||||||
} else {
|
} else {
|
||||||
this->group = this->group->next;
|
this->group = this->group->next;
|
||||||
prev = this->group;
|
if (this->last_group == &group->next) this->last_group = &this->group;
|
||||||
}
|
}
|
||||||
|
|
||||||
group->next = NULL;
|
group->next = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user