1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-11 07:42:26 +01:00

Fix dormant bug in RAMAllocator::reallocate() manual_size calculation

This commit is contained in:
J. Nick Koston
2025-07-13 14:11:23 -10:00
parent b21c76a6c6
commit fe7e5feba7

View File

@@ -783,7 +783,7 @@ template<class T> class RAMAllocator {
T *reallocate(T *p, size_t n) { return this->reallocate(p, n, sizeof(T)); }
T *reallocate(T *p, size_t n, size_t manual_size) {
size_t size = n * sizeof(T);
size_t size = n * manual_size;
T *ptr = nullptr;
#ifdef USE_ESP32
if (this->flags_ & Flags::ALLOC_EXTERNAL) {