From e95f8072517acf4fff0b4bfe3ba4b2754cf84a56 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 26 May 2020 10:59:12 +0200 Subject: [PATCH] sign-compare --- client/src/cmddata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/cmddata.c b/client/src/cmddata.c index 55fac1d0b..5aba8e537 100644 --- a/client/src/cmddata.c +++ b/client/src/cmddata.c @@ -1624,7 +1624,7 @@ int getSamples(uint32_t n, bool verbose) { if (verbose) PrintAndLogEx(INFO, "Unpacking..."); BitstreamOut bout = { got, bits_per_sample * n, 0}; - int j = 0; + uint32_t j = 0; for (j = 0; j * bits_per_sample < n * 8 && j < n; j++) { uint8_t sample = getByte(bits_per_sample, &bout); GraphBuffer[j] = ((int) sample) - 127; @@ -1634,7 +1634,7 @@ int getSamples(uint32_t n, bool verbose) { if (verbose) PrintAndLogEx(INFO, "Unpacked %d samples", j); } else { - for (int j = 0; j < n; j++) { + for (uint32_t j = 0; j < n; j++) { GraphBuffer[j] = ((int)got[j]) - 127; } GraphTraceLen = n;