Skip to content

Fix Serial.write(0) overloading #5878

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 1 commit into from
Mar 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions cores/esp8266/HardwareSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,7 @@ class HardwareSerial: public Stream
{
return uart_write(_uart, (const char*)buffer, size);
}
size_t write(const char *buffer)
{
return buffer? uart_write(_uart, buffer, strlen(buffer)): 0;
}
using Print::write; // Import other write() methods to support things like write(0) properly
operator bool() const
{
return _uart != 0;
Expand Down