shithub: neatroff

Download patch

ref: f709b9219a3029d875e7e48040757d6008c67184
parent: 14ba0ff3bd9d073e710bf1c745351e0f299ed502
author: Ali Gholami Rudi <ali@rudi.ir>
date: Sat Aug 30 16:37:29 EDT 2014

in: \n(.c when eof is reached

--- a/in.c
+++ b/in.c
@@ -168,7 +168,7 @@
 	struct inbuf *cur = buf;
 	while (cur && !cur->fin)
 		cur = cur->prev;
-	return cur->lnum;
+	return cur ? cur->lnum : 0;
 }
 
 static char **args_init(char **args)