X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/f1004b345ea236d8ebb130672b066c4e95e2e298..68541dddc2734755f4fd306e327dffa89640ecdd:/client/cmddata.c diff --git a/client/cmddata.c b/client/cmddata.c index 8f2aea5a..823da9ce 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -40,8 +40,8 @@ void setDemodBuf(uint8_t *buff, size_t size, size_t startIdx) if (buff == NULL) return; - if ( size + startIdx >= MAX_DEMOD_BUF_LEN) - size = MAX_DEMOD_BUF_LEN; + if ( size > MAX_DEMOD_BUF_LEN - startIdx) + size = MAX_DEMOD_BUF_LEN - startIdx; size_t i = 0; for (; i < size; i++){ @@ -1161,7 +1161,7 @@ int getSamples(int n, bool silent) if(response.arg[0] > 0) { sample_config *sc = (sample_config *) response.d.asBytes; - PrintAndLog("Samples @ %d bits/smpl, decimation 1:%d ", sc->bits_per_sample + if (!silent) PrintAndLog("Samples @ %d bits/smpl, decimation 1:%d ", sc->bits_per_sample , sc->decimation); bits_per_sample = sc->bits_per_sample; }