Skip to content

Commit 1f01710

Browse files
author
Jeremy Ruhland (hatchery)
committed
fixed dereferencing bug
1 parent a4963fe commit 1f01710

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ESP8266.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* THE SOFTWARE.
2020
*/
2121
#include "ESP8266.h"
22+
#include <avr/pgmspace.h>
2223

2324
#define LOG_OUTPUT_DEBUG (1)
2425
#define LOG_OUTPUT_DEBUG_PREFIX (1)
@@ -1209,7 +1210,7 @@ bool ESP8266::sATCIPSENDSingleFromFlash(const uint8_t *buffer, uint32_t len)
12091210
if (recvFind(">", 5000)) {
12101211
rx_empty();
12111212
for (uint32_t i = 0; i < len; i++) {
1212-
m_puart->write(pgm_read_byte(buffer[i]));
1213+
m_puart->write((char) pgm_read_byte(&buffer[i]));
12131214
}
12141215
return recvFind("SEND OK", 10000);
12151216
}
@@ -1225,7 +1226,7 @@ bool ESP8266::sATCIPSENDMultipleFromFlash(uint8_t mux_id, const uint8_t *buffer,
12251226
if (recvFind(">", 5000)) {
12261227
rx_empty();
12271228
for (uint32_t i = 0; i < len; i++) {
1228-
m_puart->write(pgm_read_byte(buffer[i]));
1229+
m_puart->write((char) pgm_read_byte(&buffer[i]));
12291230
}
12301231
return recvFind("SEND OK", 10000);
12311232
}

0 commit comments

Comments
 (0)