mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Allow Print::println() to work with PROGMEM strings (#6450)
Adjust the ::write implementation in Print and its overridden copy in UART to allow it to silentely accept PROGMEM strings (since there is no write_P macro). Fixes #6383
This commit is contained in:
committed by
GitHub
parent
37bb628019
commit
7436f3802a
@ -495,7 +495,7 @@ uart_write(uart_t* uart, const char* buf, size_t size)
|
||||
size_t ret = size;
|
||||
const int uart_nr = uart->uart_nr;
|
||||
while (size--)
|
||||
uart_do_write_char(uart_nr, *buf++);
|
||||
uart_do_write_char(uart_nr, pgm_read_byte(buf++));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user