diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2015-05-10 00:22:19 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2015-05-10 00:22:49 +0200 |
commit | 2ef7323f265ec4b3ee186309a945b601c1e35fd7 (patch) | |
tree | 27d6eef116afc03ae8114c7539041137b320170d /degesch.c | |
parent | e859693bf252270fc6cca4cf6df952f9f5be8d47 (diff) | |
download | xK-2ef7323f265ec4b3ee186309a945b601c1e35fd7.tar.gz xK-2ef7323f265ec4b3ee186309a945b601c1e35fd7.tar.xz xK-2ef7323f265ec4b3ee186309a945b601c1e35fd7.zip |
Fix completion_add_word()
Diffstat (limited to 'degesch.c')
-rw-r--r-- | degesch.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -5193,7 +5193,8 @@ completion_add_word (struct completion *self, size_t start, size_t end) if (!self->words) self->words = xcalloc ((self->words_alloc = 4), sizeof *self->words); 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 }; } |