From 60aab1b87bd6dc5717b385e9281b8e431970c636 Mon Sep 17 00:00:00 2001 From: Olivier Date: Sat, 27 May 2017 21:13:30 +0200 Subject: [PATCH] Fix ext. EEPROM update() (#866) --- drivers/extEEPROM/extEEPROM.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/extEEPROM/extEEPROM.cpp b/drivers/extEEPROM/extEEPROM.cpp index bc29275..f6d3bc6 100644 --- a/drivers/extEEPROM/extEEPROM.cpp +++ b/drivers/extEEPROM/extEEPROM.cpp @@ -1,4 +1,4 @@ -/*-----------------------------------------------------------------------------* +/*-----------------------------------------------------------------------------* * extEEPROM.cpp - Arduino library to support external I2C EEPROMs. * * * * This library will work with most I2C serial EEPROM chips between 2k bits * @@ -240,7 +240,7 @@ int extEEPROM::read(unsigned long addr) //For I2C errors, the status from the Arduino Wire library is passed back through to the caller. byte extEEPROM::update(unsigned long addr, byte *values, unsigned int nBytes) { - for (uint8_t i = 0; i < nBytes; i++) { + for (unsigned int i = 0; i < nBytes; i++) { const uint8_t newValue = values[i]; if (newValue != read(addr + i)) { write(addr + i, newValue);