diff --git a/src/components/dialog_methods.c b/src/components/dialog_methods.c index 1bd0f5b..afa842a 100644 --- a/src/components/dialog_methods.c +++ b/src/components/dialog_methods.c @@ -24,7 +24,7 @@ struct dialog_input *inputs) line->input_count = count; line->inputs = inputs; for (count = 0; this->text[count]; count++); - this->text = my_realloc(this->text, count, count + sizeof(void *)); + this->text = my_realloc(this->text, (count + 1) * sizeof(void *), (count + 2) * sizeof(void *)); if (!this->text) return; this->text[count] = line;