summaryrefslogtreecommitdiffstats
path: root/discover/grub2/parser-api.c
diff options
context:
space:
mode:
Diffstat (limited to 'discover/grub2/parser-api.c')
-rw-r--r--discover/grub2/parser-api.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/discover/grub2/parser-api.c b/discover/grub2/parser-api.c
index 765bd87..f8915a1 100644
--- a/discover/grub2/parser-api.c
+++ b/discover/grub2/parser-api.c
@@ -75,6 +75,7 @@ struct grub2_word *create_word_text(struct grub2_parser *parser,
word->type = GRUB2_WORD_TEXT;
word->text = talloc_strdup(word, text);
word->next = NULL;
+ word->last = word;
return word;
}
@@ -86,6 +87,7 @@ struct grub2_word *create_word_var(struct grub2_parser *parser,
word->var.name = talloc_strdup(word, name);
word->var.split = split;
word->next = NULL;
+ word->last = word;
return word;
}
@@ -103,5 +105,6 @@ void argv_append(struct grub2_argv *argv, struct grub2_word *word)
void word_append(struct grub2_word *w1, struct grub2_word *w2)
{
- w1->next = w2;
+ w1->last->next = w2;
+ w1->last = w2;
}
OpenPOWER on IntegriCloud