Check return value of read in BFgets
diff --git a/driver-bitforce.c b/driver-bitforce.c
index c45b250..ae5b4ce 100644
--- a/driver-bitforce.c
+++ b/driver-bitforce.c
@@ -39,7 +39,7 @@ static void BFgets(char *buf, size_t bufLen, int fd)
{
do
--bufLen;
- while (likely(bufLen && read(fd, buf, 1) && (buf++)[0] != '\n'));
+ while (likely(bufLen && read(fd, buf, 1) == 1 && (buf++)[0] != '\n'));
buf[0] = '\0';
}