Fix completion_add_word()
This commit is contained in:
parent
e859693bf2
commit
2ef7323f26
@ -5193,7 +5193,8 @@ completion_add_word (struct completion *self, size_t start, size_t end)
|
|||||||
if (!self->words)
|
if (!self->words)
|
||||||
self->words = xcalloc ((self->words_alloc = 4), sizeof *self->words);
|
self->words = xcalloc ((self->words_alloc = 4), sizeof *self->words);
|
||||||
if (self->words_len == self->words_alloc)
|
if (self->words_len == self->words_alloc)
|
||||||
self->words = xrealloc (self->words, (self->words_alloc <<= 1));
|
self->words = xreallocarray (self->words,
|
||||||
|
(self->words_alloc <<= 1), sizeof *self->words);
|
||||||
self->words[self->words_len++] = (struct completion_word) { start, end };
|
self->words[self->words_len++] = (struct completion_word) { start, end };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user