mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-18 20:19:11 +00:00
(svn r15085) -Fix (r14164): Clearing a settings group did not delete old items nor reset the last_item pointer, causing lists to not be saved unless they started blank.
This commit is contained in:
@@ -77,6 +77,13 @@ IniItem *IniGroup::GetItem(const char *name, bool create)
|
||||
return new IniItem(this, name, len);
|
||||
}
|
||||
|
||||
void IniGroup::Clear()
|
||||
{
|
||||
delete this->item;
|
||||
this->item = NULL;
|
||||
this->last_item = &this->item;
|
||||
}
|
||||
|
||||
IniFile::IniFile(const char **list_group_names) : group(NULL), comment(NULL), list_group_names(list_group_names)
|
||||
{
|
||||
this->last_group = &this->group;
|
||||
|
Reference in New Issue
Block a user