Skip to content

Commit 4ed59c2

Browse files
committed
Use reinterpret_cast to cast __FlashStringHelper to const char*
1 parent 19b8d0e commit 4ed59c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arduino/avr/cores/arduino/Print.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ size_t Print::write(const uint8_t *buffer, size_t size)
4141

4242
size_t Print::print(const __FlashStringHelper *ifsh)
4343
{
44-
const char PROGMEM *p = (const char PROGMEM *)ifsh;
44+
const char *p = reinterpret_cast<const char *>(ifsh);
4545
size_t n = 0;
4646
while (1) {
4747
unsigned char c = pgm_read_byte(p++);

0 commit comments

Comments
 (0)