diff --git a/src/exploit.cpp b/src/exploit.cpp index 300d1c1..73af0ee 100644 --- a/src/exploit.cpp +++ b/src/exploit.cpp @@ -79,8 +79,8 @@ struct Cookie { #define CHECK_RET(value) { int ret = (value); if(ret != RETURN_SUCCESS) return ret;} #define CHECK_RUNNING() if (!running) return RETURN_STOP -#define startBlockingCapture(cb) if(dev->startCaptureBlockingMode(cb, nullptr, this->timeout) != 1) { return running ? RETURN_FAIL : RETURN_STOP; } -#define startBlockingCaptureWithCookie(cb, cookie) if(dev->startCaptureBlockingMode(cb, cookie, this->timeout) != 1) { return running ? RETURN_FAIL : RETURN_STOP; } +#define startBlockingCaptureWithCookie(cb, cookie) if(dev->startCaptureBlockingMode(cb, cookie, this->timeout) != 1) return RETURN_FAIL; else CHECK_RUNNING() +#define startBlockingCapture(cb) startBlockingCaptureWithCookie(cb, nullptr) static void cpuSleep(int ms) { auto start = std::chrono::high_resolution_clock::now();