1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-18 20:19:11 +00:00

(svn r14257) -Fix (r14153): incorrect update of ini-file group tail pointer causing memory corruption.

This commit is contained in:
rubidium
2008-09-07 08:51:26 +00:00
parent 72f86fe801
commit f4ee4fd5ae

View File

@@ -124,9 +124,10 @@ void IniFile::RemoveGroup(const char *name)
if (prev != NULL) {
prev->next = prev->next->next;
if (this->last_group == &group->next) this->last_group = &prev->next;
} else {
this->group = this->group->next;
prev = this->group;
if (this->last_group == &group->next) this->last_group = &this->group;
}
group->next = NULL;