From 466e7740d71bb76ed96d3509e8b987e1ed9019bb Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 7 Sep 2008 08:51:26 +0000 Subject: (svn r14257) -Fix (r14153): incorrect update of ini-file group tail pointer causing memory corruption. --- src/ini.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ini.cpp b/src/ini.cpp index 61ac06289..dc3f452a5 100644 --- a/src/ini.cpp +++ b/src/ini.cpp @@ -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; -- cgit v1.2.3-70-g09d2