From b97e6aa5a095ab4e0795c1da80716c7cdbd90ac0 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 22 Apr 2012 10:57:23 +1000 Subject: [PATCH] Presumably we should return false when the capability is missing in libztex_checkCapability. --- libztex.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libztex.c b/libztex.c index c6bd6aa7..d76d7987 100644 --- a/libztex.c +++ b/libztex.c @@ -64,8 +64,10 @@ static bool libztex_checkDevice(struct libusb_device *dev) static bool libztex_checkCapability(struct libztex_device *ztex, int i, int j) { if (!((i >= 0) && (i <= 5) && (j >= 0) && (j < 8) && - (((ztex->interfaceCapabilities[i] & 255) & (1 << j)) != 0))) + (((ztex->interfaceCapabilities[i] & 255) & (1 << j)) != 0))) { applog(LOG_ERR, "%s: capability missing: %d %d", ztex->repr, i, i); + return false; + } return true; }