update geadline on realloc

This commit is contained in:
starnakin 2023-07-24 02:59:08 +02:00
parent 5dcace0cbe
commit d3e788868a

View File

@ -33,7 +33,7 @@ geadline(prompt) {
} else {
size = size + 1;
if (size > capacity) {
buf = reallocarray(buf, capacity, capacity * 2);
buf = realloc(buf, capacity * 2);
if (buf == NULL)
return NULL;
capacity = capacity * 2;