diff --git a/src/ini.cpp b/src/ini.cpp --- a/src/ini.cpp +++ b/src/ini.cpp @@ -19,6 +19,14 @@ IniItem::IniItem(IniGroup *parent, const parent->last_item = &this->next; } +IniItem::IniItem(IniGroup *parent, const char *name, const char *value) : next(NULL), comment(NULL) +{ + this->name = strdup(name); + this->value = strdup(value); + *parent->last_item = this; + parent->last_item = &this->next; +} + IniItem::~IniItem() { free(this->name);