This commit is contained in:
iceman1001 2019-04-07 20:21:14 +02:00
parent e95955b793
commit 8aa5dec805

View file

@ -446,9 +446,8 @@ int CmdIndalaDemodAlt(const char *Cmd) {
} }
// Checking UID against next occurrences // Checking UID against next occurrences
int failed = 0;
for (; i + uidlen <= rawbit;) { for (; i + uidlen <= rawbit;) {
failed = 0; int failed = 0;
for (bit = 0; bit < uidlen; bit++) { for (bit = 0; bit < uidlen; bit++) {
if (bits[bit] != rawbits[i++]) { if (bits[bit] != rawbits[i++]) {
failed = 1; failed = 1;
@ -468,14 +467,13 @@ int CmdIndalaDemodAlt(const char *Cmd) {
// since this changes graphbuffer data. // since this changes graphbuffer data.
GraphTraceLen = 32 * uidlen; GraphTraceLen = 32 * uidlen;
i = 0; i = 0;
int phase = 0; int phase;
for (bit = 0; bit < uidlen; bit++) { for (bit = 0; bit < uidlen; bit++) {
if (bits[bit] == 0) { if (bits[bit] == 0) {
phase = 0; phase = 0;
} else { } else {
phase = 1; phase = 1;
} }
int j;
for (j = 0; j < 32; j++) { for (j = 0; j < 32; j++) {
GraphBuffer[i++] = phase; GraphBuffer[i++] = phase;
phase = !phase; phase = !phase;