(svn r14257) -Fix (r14153): incorrect update of ini-file group tail pointer causing memory corruption.
authorrubidium
Sun, 07 Sep 2008 08:51:26 +0000
changeset 10082 44931aeaa000
parent 10081 98283ca03a8d
child 10083 eee4e42aa15b
(svn r14257) -Fix (r14153): incorrect update of ini-file group tail pointer causing memory corruption.
src/ini.cpp
--- a/src/ini.cpp	Sat Sep 06 12:54:11 2008 +0000
+++ b/src/ini.cpp	Sun Sep 07 08:51:26 2008 +0000
@@ -124,9 +124,10 @@
 
 	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;