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 and pfeerick committed May 2, 2024
1 parent bda5fd0 commit cc50ce4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions radio/src/gui/colorlcd/view_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,12 @@ 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;
if (buffer[i] == '\r' && buffer[i + 1] == '\n') i += 1;

lv_obj_t* row = lv_obj_create(obj);
lv_obj_set_layout(row, LV_LAYOUT_FLEX);
Expand Down

0 comments on commit cc50ce4

Please sign in to comment.