Skip to content

Commit a36a841

Browse files
committed
Minor bug fix
1 parent 0fe299d commit a36a841

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/ECCX08.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ int ECCX08Class::writeConfiguration(const byte data[])
405405
// not writable
406406
continue;
407407
}
408-
408+
409409
if (!write(0, i / 4, &data[i], 4)) {
410410
return 0;
411411
}
@@ -476,6 +476,7 @@ int ECCX08Class::updateHMAC(const byte data[], int length) {
476476
return 0;
477477
}
478478

479+
// Processing message
479480
int currLength = 0;
480481
while (length) {
481482
data += currLength;
@@ -486,8 +487,8 @@ int ECCX08Class::updateHMAC(const byte data[], int length) {
486487
currLength = length;
487488
}
488489
length -= currLength;
489-
490-
if (!sendCommand(0x47, 0x01, length, data, length)) {
490+
491+
if (!sendCommand(0x47, 0x01, currLength, data, currLength)) {
491492
return 0;
492493
}
493494

0 commit comments

Comments
 (0)