提交 af23d0bb 编写于 作者: B Bob 提交者: Me No Dev

Return empty string instead of "0" (#2673)

上级 582e6433
......@@ -286,7 +286,7 @@ size_t EEPROMClass::readString (int address, char* value, size_t maxLen)
String EEPROMClass::readString (int address)
{
if (address < 0 || address > _size)
return String(0);
return String();
uint16_t len;
for (len = 0; len <= _size; len++)
......@@ -294,7 +294,7 @@ String EEPROMClass::readString (int address)
break;
if (address + len > _size)
return String(0);
return String();
char value[len];
memcpy((uint8_t*) value, _data + address, len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册