Skip to content

Commit

Permalink
Merge pull request #2 from dennisschagt/bugfix/issue-1
Browse files Browse the repository at this point in the history
Check if there is room left before printing '<'
  • Loading branch information
dennisschagt authored Mar 19, 2020
2 parents d8ea471 + 7b9f793 commit b7be405
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions base.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,9 +750,11 @@ unsigned int stfl_print_richtext(struct stfl_widget *w, WINDOW *win, unsigned in
wmemcpy(stylename, p1 + 1, p2 - p1 - 1);
stylename[p2 - p1 - 1] = L'\0';
if (wcscmp(stylename,L"")==0) {
mvwaddnwstr(win, y, x, L"<", 1);
retval += 1;
++x;
if (end_col - x > 0) {
mvwaddnwstr(win, y, x, L"<", 1);
retval += 1;
++x;
}
} else if (wcscmp(stylename, L"/")==0) {
stfl_style(win, style_normal);
} else {
Expand Down

0 comments on commit b7be405

Please sign in to comment.