Fixing a segfault

This commit is contained in:
Anonymus Raccoon
2020-04-22 11:35:14 +02:00
parent bbe6958598
commit 69c4a77db0
+1 -1
View File
@@ -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;