Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix last line of interactive checklist.
Browse files Browse the repository at this point in the history
philmoz committed May 1, 2024
1 parent 7968867 commit ec83d30
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
@@ -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;

0 comments on commit ec83d30

Please sign in to comment.