From 594fb05c87ae9cb06e3fb4552846d0719c7b3d15 Mon Sep 17 00:00:00 2001 From: dtrg Date: Thu, 20 Mar 2008 22:50:50 +0000 Subject: [PATCH] Properly handles files ending in a partial line. --- mach/proto/top/top.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mach/proto/top/top.c b/mach/proto/top/top.c index a82192a5..5a9f842f 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';