Skip to content

Commit c9d6f58

Browse files
committed
fixed EEPROMRollingCodeStorage overwrite other code
EEPROMRollingCodeStorage did write 4 instad of 2 bytes
1 parent a5ca325 commit c9d6f58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/EEPROMRollingCodeStorage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ uint16_t EEPROMRollingCodeStorage::nextCode() {
1010
Serial.print("Rolling code: ");
1111
Serial.println(code);
1212
#endif
13-
EEPROM.put(address, code + 1);
13+
EEPROM.put(address, (uint16_t)(code + 1));
1414
#if defined(ESP32) || defined(ESP8266)
1515
EEPROM.commit();
1616
#endif

0 commit comments

Comments
 (0)