]> Pileus Git - lackey/commitdiff
Fix bug when adding new config groups
authorAndy Spencer <andy753421@gmail.com>
Sun, 16 Jun 2013 08:49:46 +0000 (08:49 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sun, 16 Jun 2013 08:50:01 +0000 (08:50 +0000)
src/conf.c

index 5d59d22e29c983fe39b01e122236521d70e71ca9..740932afcfb5f6a85ed8082602998f98f36498c0 100644 (file)
@@ -103,10 +103,10 @@ static void set_value(const char *group, const char *name,
        if (groupend) {
                /* Append to group */
                line_t *line = new0(line_t);
        if (groupend) {
                /* Append to group */
                line_t *line = new0(line_t);
-               groupend->next = line;
                line->key      = strcopy(key);
                line->value    = strcopy(value);
                line->next     = groupend->next;
                line->key      = strcopy(key);
                line->value    = strcopy(value);
                line->next     = groupend->next;
+               groupend->next = line;
        } else if (fileend)  {
                /* Create new group */
                line_t *blank  = new0(line_t);
        } else if (fileend)  {
                /* Create new group */
                line_t *blank  = new0(line_t);