Skip to content

Commit

Permalink
[notcurses] don't handle invalid line in form explication
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Feb 18, 2025
1 parent 0b70cf9 commit c2b1f0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/notcurses/notcurses.c
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,7 @@ raise_form_explication(struct ncplane* n, const char* text, int linesz){
ncplane_dim_yx(n, NULL, &cols);
--cols;
tot = 0;
for(y = 0 ; (unsigned)y < sizeof(linepre) / sizeof(*linepre) ; ++y){
for(y = 0 ; y < sizeof(linepre) / sizeof(*linepre) ; ++y){
while(isspace(text[tot])){
++tot;
}
Expand Down Expand Up @@ -1858,9 +1858,9 @@ raise_form_explication(struct ncplane* n, const char* text, int linesz){
compat_set_fg(ps->n, FORMBORDER_COLOR);
bevel_all(ps->n);
compat_set_fg(ps->n, FORMTEXT_COLOR);
do{
while(y--){
ncplane_printf_yx(ps->n, y + 1, 1, "%.*s", linelen[y], text + linepre[y]);
}while(y--);
}
screen_update();
return ps;
}
Expand Down

0 comments on commit c2b1f0a

Please sign in to comment.