]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmddata.c
Merge branch 'master' of https://github.com/Proxmark/proxmark3
[proxmark3-svn] / client / cmddata.c
index 8f2aea5aa75c068fe9d4675f56434333f71e2f24..823da9cef465da873660e1b147d4ea745bac91d2 100644 (file)
@@ -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;
        }
Impressum, Datenschutz