[BUG] halog: correctly handle truncated last line

If last line is truncated (eg: truncated file), then halog would loop on
it forever.
diff --git a/contrib/halog/fgets2-64.c b/contrib/halog/fgets2-64.c
index 236b970..9aae454 100644
--- a/contrib/halog/fgets2-64.c
+++ b/contrib/halog/fgets2-64.c
@@ -155,6 +155,7 @@
 				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 61d9ef5..6c5bc6b 100644
--- a/contrib/halog/fgets2.c
+++ b/contrib/halog/fgets2.c
@@ -130,6 +130,7 @@
 				return NULL;
 
 			*end = '\0';
+			end = line; /* ensure we stop next time */
 			return line;
 		}