Commit f44831db139ce0bb1825fcc70b080069134efdc1

Con Kolivas 2014-02-23T22:39:17

Hfa clear readbuf can return a nonsense amount when there's a return error so ignore the amount.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/driver-hashfast.c b/driver-hashfast.c
index bab5250..5850803 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -470,7 +470,7 @@ static bool hfa_clear_readbuf(struct cgpu_info *hashfast)
 			break;
 		}
 		ret = usb_read(hashfast, buf, 512, &amount, C_HF_CLEAR_READ);
-	} while (!ret || amount);
+	} while (!ret);
 
 	if (ret && ret != LIBUSB_ERROR_TIMEOUT)
 		return false;