diff options
author | Simon Tatham <anakin@pobox.com> | 2021-10-26 17:37:35 +0100 |
---|---|---|
committer | Simon Tatham <anakin@pobox.com> | 2021-10-26 17:37:35 +0100 |
commit | 6f60651f1066c14e7d4f8e64d98d7b35bed963b7 (patch) | |
tree | 14f28ff640c941d32d702a6d6870bc6f41bd43a7 /cursesmenudisplay.c | |
parent | 28e4091c1dd856b5c19df39846dbd60e1690197f (diff) |
New upstream version 1.19
Diffstat (limited to 'cursesmenudisplay.c')
-rw-r--r-- | cursesmenudisplay.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cursesmenudisplay.c b/cursesmenudisplay.c index fdb36eb..23bd27a 100644 --- a/cursesmenudisplay.c +++ b/cursesmenudisplay.c @@ -132,7 +132,7 @@ void menu_displayentry(struct menu *pmenu, struct menuentry *pentry, int y, int { utf8strncpy(buffer, pentry->text2, menu_width - 2); x = menu_offset + menu_width - 1 - utf8strlen(buffer); - mvprintw(y, x, buffer); + mvprintw(y, x, "%s", buffer); } /* Plot main text */ @@ -148,7 +148,7 @@ void menu_displayentry(struct menu *pmenu, struct menuentry *pentry, int y, int if(pentry->flags & MENU_BOLD) attron(A_BOLD); - mvprintw(y, x, buffer); + mvprintw(y, x, "%s", buffer); if(pentry->flags & MENU_BOLD) attroff(A_BOLD); } @@ -197,7 +197,7 @@ void menu_displayentry(struct menu *pmenu, struct menuentry *pentry, int y, int x = menu_offset + menu_width - 1 - utf8strlen(buffer); if(pentry->flags & MENU_EDITING) attron(COLOR_PAIR(colourpair_white)); - mvprintw(y, x, buffer); + mvprintw(y, x, "%s", buffer); if(pentry->flags & MENU_EDITING) attroff(COLOR_PAIR(colourpair_white)); } @@ -208,7 +208,7 @@ void menu_displayentry(struct menu *pmenu, struct menuentry *pentry, int y, int utf8strncpy(buffer, pentry->text3, menu_width - 2); x = menu_offset + 1; - mvprintw(y, x, buffer); + mvprintw(y, x, "%s", buffer); } if(selected) @@ -357,7 +357,7 @@ void menu_display(struct menu *pmenu, int redraw) if(i == 5) attron(COLOR_PAIR(colourpair_magenta)); sprintf(buffer, "%c", title[i]); - mvprintw(2, x, buffer); + mvprintw(2, x, "%s", buffer); x +=2; } attroff(COLOR_PAIR(colourpair_red)); @@ -373,7 +373,7 @@ void menu_display(struct menu *pmenu, int redraw) if(x < 0) { x = (display_size_x - utf8strlen(pmenu->title)) / 2; - mvprintw(y, x, pmenu->title); + mvprintw(y, x, "%s", pmenu->title); } else { @@ -387,7 +387,7 @@ void menu_display(struct menu *pmenu, int redraw) buffer[j] = pmenu->title[i + j]; j ++; } buffer[j] = 0; - mvprintw(y, x, buffer); + mvprintw(y, x, "%s", buffer); x += 2; i += j - 1; } } |