diff --git a/libbitfury.c b/libbitfury.c index e5e90e40..51e920a7 100644 --- a/libbitfury.c +++ b/libbitfury.c @@ -561,7 +561,11 @@ void libbitfury_sendHashData(struct thr_info *thr, struct bitfury_device *bf, in memcpy(newbuf, spi_getrxbuf() + 4 + chip, 17*4); tm_i2c_clear_oe(slot); - d->job_switched = (newbuf[16] != oldbuf[16]); + if ( 0 == newbuf[16] || 0 == !newbuf[16] ) + d->job_switched = ( newbuf[16] != oldbuf[16] ); + else + applog(LOG_WARNING, "Unexpected value in newbuf[16] == 0x%08x", newbuf[16]); + d->old_num = 0; d->future_num = 0;