mirror of
https://github.com/fltk/fltk.git
synced 2026-05-22 23:37:02 +08:00
Fix in Fl_Text_Buffer::next_char() necessary for empty buffer.
This commit is contained in:
@@ -2145,7 +2145,8 @@ int Fl_Text_Buffer::next_char(int pos) const
|
||||
break;
|
||||
}
|
||||
}
|
||||
l = fl_utf8_next_composed_char(t, t + l) - t; // length of possibly composed character starting at pos
|
||||
// length of possibly composed character starting at pos
|
||||
l = (l > 0 ? fl_utf8_next_composed_char(t, t + l) - t : 0);
|
||||
} else if (l == -1) {
|
||||
l = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user