Incoming status messages can be an arbitrary length; if so, the status
line may be corrupt.
This change uses the 'n' variant of mvwaddnstr(), so we only write one
line of characters.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
static void nc_scr_status_draw(struct nc_scr *scr)
{
- mvwaddstr(scr->main_ncw, LINES - nc_scr_pos_status, 1,
- scr->frame.status);
+ mvwaddnstr(scr->main_ncw, LINES - nc_scr_pos_status, 1,
+ scr->frame.status, COLS);
}
int nc_scr_post(struct nc_scr *scr)