Fixed printTo(String) which wrote numbers instead of strings (issue #120)

This commit is contained in:
Benoit Blanchon committed 2015-09-19 16:23:09 +02:00
1 parent b5c8cd1766
commit 155dd653e7
2 files changed
+3 -2

No files matched your search

@@ -18,7 +18,8 @@ class DynamicStringBuilder : public Print {
DynamicStringBuilder(String &str) : _str(str) {}
virtual size_t write(uint8_t c) {
_str += c;
// Need to cast to char, otherwise String will print a number (issue #120)
_str += static_cast<char>(c);
return 1;
}