diff --git a/driver-bitforce.c b/driver-bitforce.c index c45b2504..ae5b4ce7 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'; }