Fixed serialized() not working with Flash strings (fixes #1030)

This commit is contained in:
Benoit Blanchon committed 2019-06-21 08:46:32 +02:00
1 parent 59f9c9747f
commit ce247a5637
2 files changed
+6 -1

No files matched your search

@@ -29,7 +29,7 @@ class SizedFlashStringAdapter {
char* save(MemoryPool* pool) const {
if (!_str) return NULL;
char* dup = pool->allocFrozenString(_size);
if (!dup) memcpy_P(dup, (const char*)_str, _size);
if (dup) memcpy_P(dup, (const char*)_str, _size);
return dup;
}