mirror of
https://github.com/esphome/esphome.git
synced 2025-07-28 14:16:40 +00:00
Fix dormant bug in RAMAllocator::reallocate() manual_size calculation (#9482)
This commit is contained in:
parent
f5c8595a46
commit
d31b8ad2e2
@ -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) { return this->reallocate(p, n, sizeof(T)); }
|
||||||
|
|
||||||
T *reallocate(T *p, size_t n, size_t manual_size) {
|
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;
|
T *ptr = nullptr;
|
||||||
#ifdef USE_ESP32
|
#ifdef USE_ESP32
|
||||||
if (this->flags_ & Flags::ALLOC_EXTERNAL) {
|
if (this->flags_ & Flags::ALLOC_EXTERNAL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user