ソースを参照

Properly handles files ending in a partial line.

dtrg 16 年 前
コミット
594fb05c87
1 ファイル変更2 行追加0 行削除
  1. 2 0
      mach/proto/top/top.c

+ 2 - 0
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';