dont overallocate str

This commit is contained in:
Roland W-H 2022-11-19 16:43:16 +00:00
parent 738bd9a99c
commit 51cd993b61
1 changed files with 1 additions and 0 deletions

View File

@ -29,6 +29,7 @@ char* dyninput_str(int_least64_t maxsize)
{
c = getchar();
if (i + 2 == size)
if (i + 1 == size)
{
char* tmp = realloc(str, size + 1);
if (!tmp)