Fix (limit) 'lf cotag demod' custom clock argument

This commit is contained in:
towelbyte
2026-06-26 20:23:13 +02:00
parent 2655037a9f
commit 78b621264c
+4
View File
@@ -428,6 +428,10 @@ end:
int demodCOTAG(bool verbose, int clock, int threshold) {
int clk = (clock > 0) ? clock : LF_COTAG_CLOCK;
if (clk < 32) {
PrintAndLogEx(FAILED, "custom clock must be >= 32, got " _RED_("%d"), clk);
return PM3_EINVARG;
}
return demod_cotag(g_GraphBuffer, (int)g_GraphTraceLen, clk, -1, threshold, verbose);
}