Skip to content

Commit

Permalink
fix(color): last interactive checklist line not shown if EoF not newl…
Browse files Browse the repository at this point in the history
…ine (#4947)
  • Loading branch information
philmoz authored May 2, 2024
1 parent e72f1d2 commit 5281b8b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions radio/src/gui/colorlcd/view_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,10 @@ class ViewChecklistWindow : public ViewTextWindow

size_t cur = 0;

for (size_t i = 0; i < bufSize; ++i) {
if (buffer[i] == '\n' || buffer[i] == '\r') {
for (size_t i = 0; i <= bufSize; ++i) {
if (buffer[i] == '\n' || buffer[i] == '\r' || buffer[i] == 0) {
// Check for end of line & end of file
if (buffer[i] == 0 && cur == i) break;
buffer[i] = 0;
if (buffer[i] == '\r' && buffer[i + 1] == '\n') i += 1;

Expand Down

0 comments on commit 5281b8b

Please sign in to comment.