Skip to content

Allow Print::println() to work with PROGMEM strings #6450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 28, 2019

Conversation

earlephilhower
Copy link
Collaborator

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

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 esp8266#6383
@earlephilhower earlephilhower merged commit 7436f38 into esp8266:master Aug 28, 2019
@earlephilhower earlephilhower deleted the println branch August 28, 2019 14:59
@dontsovcmc
Copy link
Contributor

Thanks a lot!
Is it possible to show compile error if user call function that doesn't support PROGMEM array?
I mean if user writes const char text[] PROGMEM = "some text"; and calls f(text);
that has string actions inside.

@d-a-v
Copy link
Collaborator

d-a-v commented Sep 16, 2019

There is no compilation error in that case.
But a runtime crash may/will happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Usage of __PRETTY_FUNCTION__ cause exception on version 2.5.1+
4 participants