sparkfun / SparkFun_SerLCD_Arduino_Library

A library to seamlessly control the SparkFun SerLCD over I2C, SPI, and Serial.
MIT License
23 stars 10 forks source link

Fix for Issue #3 Missing return value in SerLCD::write() #4

Closed fourstix closed 4 years ago

fourstix commented 4 years ago

This pull request adds the missing return statement to the write(uint_8) function.

Currently with no return statement, the returned size_t value is undefined. It's probably zero, but who can say?

This fix adds an explicit return statement to return 1 for the size_t value for one byte written.

The bug was in my original code harvested by Sparkfun. Mea Culpa.

nseidle commented 4 years ago

Thanks for the PR fourstix. And thanks @gvansickle for reporting.