memio: fix mem_fgets() EOF case

This commit is contained in:
Roman Fomin 2023-05-04 23:24:37 +07:00
parent e43aa4b836
commit 8553ae2beb

View File

@ -177,7 +177,7 @@ char *mem_fgets(char *str, int count, MEMFILE *stream)
if (mem_feof(stream))
return NULL;
str[++i] = '\0';
str[i] = '\0';
return str;
}