Merge pull request #18129 from neheb/8

horst: fix compilation with ncurses 6.3

Looks like a trivial fix due to ncurses 6.3. 
Similar actions will be needed for some other packages, too.
Merging.
This commit is contained in:
Hannu Nyman 2022-03-22 17:20:10 +02:00 committed by GitHub
commit 4e668c2a68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 1 deletions

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=horst
PKG_VERSION:=5.1
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/br101/horst/archive/v$(PKG_VERSION)/

View file

@ -0,0 +1,22 @@
--- a/display-main.c
+++ b/display-main.c
@@ -53,7 +53,7 @@ static struct ewma bpsn_avg;
void print_dump_win(const char *str, int refresh)
{
wattron(dump_win, RED);
- wprintw(dump_win, str);
+ wprintw(dump_win, "%s", str);
wattroff(dump_win, RED);
if (refresh)
wrefresh(dump_win);
--- a/display.c
+++ b/display.c
@@ -86,7 +86,7 @@ print_centered(WINDOW* win, int line, in
vsnprintf(buf, cols, fmt, ap);
va_end(ap);
- mvwprintw(win, line, cols / 2 - strlen(buf) / 2, buf);
+ mvwprintw(win, line, cols / 2 - strlen(buf) / 2, "%s", buf);
free(buf);
}