mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
sign-compare
This commit is contained in:
parent
b3ff89e41e
commit
e95f807251
1 changed files with 2 additions and 2 deletions
|
@ -1624,7 +1624,7 @@ int getSamples(uint32_t n, bool verbose) {
|
||||||
if (verbose) PrintAndLogEx(INFO, "Unpacking...");
|
if (verbose) PrintAndLogEx(INFO, "Unpacking...");
|
||||||
|
|
||||||
BitstreamOut bout = { got, bits_per_sample * n, 0};
|
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++) {
|
for (j = 0; j * bits_per_sample < n * 8 && j < n; j++) {
|
||||||
uint8_t sample = getByte(bits_per_sample, &bout);
|
uint8_t sample = getByte(bits_per_sample, &bout);
|
||||||
GraphBuffer[j] = ((int) sample) - 127;
|
GraphBuffer[j] = ((int) sample) - 127;
|
||||||
|
@ -1634,7 +1634,7 @@ int getSamples(uint32_t n, bool verbose) {
|
||||||
if (verbose) PrintAndLogEx(INFO, "Unpacked %d samples", j);
|
if (verbose) PrintAndLogEx(INFO, "Unpacked %d samples", j);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
for (int j = 0; j < n; j++) {
|
for (uint32_t j = 0; j < n; j++) {
|
||||||
GraphBuffer[j] = ((int)got[j]) - 127;
|
GraphBuffer[j] = ((int)got[j]) - 127;
|
||||||
}
|
}
|
||||||
GraphTraceLen = n;
|
GraphTraceLen = n;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue