mirror of
https://github.com/zoriya/ForecastingVillage.git
synced 2026-06-08 04:32:14 +00:00
Fixing a segfault
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user