Explorar el Código

Properly handles files ending in a partial line.

dtrg hace 16 años
padre
commit
fc44fe2185
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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';