Fix infinite loop (#346)
* Fix infinite loop Fixed the findID function getting stuck in an infinite loop when scanning certain cards. Loop now stops at 255.
This commit is contained in:
@@ -460,7 +460,7 @@ uint8_t findIDSLOT( byte find[] ) {
|
||||
///////////////////////////////////////// Find ID From EEPROM ///////////////////////////////////
|
||||
boolean findID( byte find[] ) {
|
||||
uint8_t count = EEPROM.read(0); // Read the first Byte of EEPROM that
|
||||
for ( uint8_t i = 1; i <= count; i++ ) { // Loop once for each EEPROM entry
|
||||
for ( uint8_t i = 1; i < count; i++ ) { // Loop once for each EEPROM entry
|
||||
readID(i); // Read an ID from EEPROM, it is stored in storedCard[4]
|
||||
if ( checkTwo( find, storedCard ) ) { // Check to see if the storedCard read from EEPROM
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user