diff --git a/contrib/halog/fgets2-64.c b/contrib/halog/fgets2-64.c index 236b970dd..9aae45465 100644 --- a/contrib/halog/fgets2-64.c +++ b/contrib/halog/fgets2-64.c @@ -155,6 +155,7 @@ const char *fgets2(FILE *stream) return NULL; *end = '\0'; + end = line; /* ensure we stop next time */ return line; } diff --git a/contrib/halog/fgets2.c b/contrib/halog/fgets2.c index 61d9ef58c..6c5bc6b0a 100644 --- a/contrib/halog/fgets2.c +++ b/contrib/halog/fgets2.c @@ -130,6 +130,7 @@ const char *fgets2(FILE *stream) return NULL; *end = '\0'; + end = line; /* ensure we stop next time */ return line; }