From 6410e72b6c58e1e9649e62aeafa2f54c0660c79a Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 30 Oct 2023 21:52:58 +0100 Subject: [PATCH] Add max size --- tasmota/tasmota_support/support_esp.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/tasmota_support/support_esp.ino b/tasmota/tasmota_support/support_esp.ino index a184bab4010b..6abc87c6f31d 100644 --- a/tasmota/tasmota_support/support_esp.ino +++ b/tasmota/tasmota_support/support_esp.ino @@ -678,7 +678,7 @@ uint32_t ESP_magicFlashChipSize(uint8_t spi_size) { return 1024; } */ - return (uint32_t)0x100000 << spi_size; // 0 = 8 MBit (1MB), 5 = 256 MBit (32MB) + return (uint32_t)0x100000 << (spi_size & 0x0F); // 0 = 8 MBit (1MB), 5 = 256 MBit (32MB) } uint32_t ESP_getSketchSize(void) {