mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-14 09:25:55 +08:00
Fix bug read EEPROM string add extra char
This commit is contained in:
parent
127213fcb4
commit
20e671822e
@ -270,7 +270,7 @@ bool CONFIG::read_string(int pos, String & sbuffer, int size_max)
|
|||||||
//read until max size is reached or \0 is found
|
//read until max size is reached or \0 is found
|
||||||
while (i < size_max && b != 0) {
|
while (i < size_max && b != 0) {
|
||||||
b = EEPROM.read(pos+i);
|
b = EEPROM.read(pos+i);
|
||||||
sbuffer+=char(b);
|
if (b!=0)sbuffer+=char(b);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
EEPROM.end();
|
EEPROM.end();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user