From 555d970c7d491e28f6389b5e8409d33876b44440 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 14 May 2020 17:05:51 +0200 Subject: [PATCH] clock can be negative --- client/src/graph.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/graph.c b/client/src/graph.c index 2d75f3d30..6ce443155 100644 --- a/client/src/graph.c +++ b/client/src/graph.c @@ -247,7 +247,10 @@ int GetPskClock(const char *str, bool printAns) { size_t firstPhaseShiftLoc = 0; uint8_t curPhase = 0, fc = 0; clock1 = DetectPSKClock(bits, size, 0, &firstPhaseShiftLoc, &curPhase, &fc); - setClockGrid(clock1, firstPhaseShiftLoc); + + if (clock1 >= 0) + setClockGrid(clock1, firstPhaseShiftLoc); + // Only print this message if we're not looping something if (printAns) PrintAndLogEx(SUCCESS, "Auto-detected clock rate: %d", clock1);