From: dtrg Date: Thu, 20 Mar 2008 22:50:50 +0000 (+0000) Subject: Properly handles files ending in a partial line. X-Git-Tag: release-6-0-pre-4~8 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=fc44fe2185ce1e22230bc1106ff9b98afc456fe2;p=ack.git Properly handles files ending in a partial line. --- diff --git a/mach/proto/top/top.c b/mach/proto/top/top.c index a82192a52..5a9f842f8 100644 --- a/mach/proto/top/top.c +++ b/mach/proto/top/top.c @@ -562,6 +562,8 @@ instr_p read_instr() return ip; } c = getc(inp); + if (c == EOF) + break; } ungetc(c,inp); *p = '\0';