From 20e671822e54ef614d25f88741104aba66750ce9 Mon Sep 17 00:00:00 2001 From: Luc Date: Thu, 22 Sep 2016 17:07:30 +0800 Subject: [PATCH] Fix bug read EEPROM string add extra char --- esp3d/config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp3d/config.cpp b/esp3d/config.cpp index 61999104..7a36b64b 100644 --- a/esp3d/config.cpp +++ b/esp3d/config.cpp @@ -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 while (i < size_max && b != 0) { b = EEPROM.read(pos+i); - sbuffer+=char(b); + if (b!=0)sbuffer+=char(b); i++; } EEPROM.end();