about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-09-29 23:25:38 +0200
committerMichael Vetter <jubalh@iodoru.org>2021-09-29 23:25:38 +0200
commit242696f09a49c8446ba6aef8bdad65fb58a77715 (patch)
treebd1dc5789bd47c2ce506c1e9129bb95fb9b3aa53 /src
parente5b6258c997d4faf36e2ffb8a47b386c5629b4eb (diff)
downloadprofani-tty-242696f09a49c8446ba6aef8bdad65fb58a77715.tar.gz
Fix fromat string in statusbar
Regards https://github.com/profanity-im/profanity/issues/1597#issuecomment-930540261
Diffstat (limited to 'src')
-rw-r--r--src/ui/statusbar.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ui/statusbar.c b/src/ui/statusbar.c
index 2b9960be..d395cc86 100644
--- a/src/ui/statusbar.c
+++ b/src/ui/statusbar.c
@@ -398,7 +398,7 @@ _status_bar_draw_tab(StatusBarTab* tab, int pos, int num)
     }
     if (show_name) {
         char* display_name = _display_name(tab);
-        mvwprintw(statusbar_win, 0, pos, display_name);
+        mvwprintw(statusbar_win, 0, pos, "%s", display_name);
         pos += utf8_display_len(display_name);
         free(display_name);
     }
@@ -417,7 +417,7 @@ _status_bar_draw_bracket(gboolean current, int pos, char* ch)
     if (current) {
         mvwprintw(statusbar_win, 0, pos, "-");
     } else {
-        mvwprintw(statusbar_win, 0, pos, ch);
+        mvwprintw(statusbar_win, 0, pos, "%s", ch);
     }
     wattroff(statusbar_win, bracket_attrs);
     pos++;
@@ -453,7 +453,7 @@ _status_bar_draw_time(int pos)
     pos++;
     wattroff(statusbar_win, bracket_attrs);
     wattron(statusbar_win, time_attrs);
-    mvwprintw(statusbar_win, 0, pos, statusbar->time);
+    mvwprintw(statusbar_win, 0, pos, "%s", statusbar->time);
     pos += len;
     wattroff(statusbar_win, time_attrs);
     wattron(statusbar_win, bracket_attrs);
@@ -470,7 +470,7 @@ static void
 _status_bar_draw_maintext(int pos)
 {
     if (statusbar->prompt) {
-        mvwprintw(statusbar_win, 0, pos, statusbar->prompt);
+        mvwprintw(statusbar_win, 0, pos, "%s", statusbar->prompt);
         return;
     }
 
@@ -483,12 +483,12 @@ _status_bar_draw_maintext(int pos)
             stop = true;
         } else if (g_strcmp0(pref, "user") == 0) {
             Jid* jidp = jid_create(statusbar->fulljid);
-            mvwprintw(statusbar_win, 0, pos, jidp->localpart);
+            mvwprintw(statusbar_win, 0, pos, "%s", jidp->localpart);
             jid_destroy(jidp);
             stop = true;
         } else if (g_strcmp0(pref, "barejid") == 0) {
             Jid* jidp = jid_create(statusbar->fulljid);
-            mvwprintw(statusbar_win, 0, pos, jidp->barejid);
+            mvwprintw(statusbar_win, 0, pos, "%s", jidp->barejid);
             jid_destroy(jidp);
             stop = true;
         }
@@ -497,7 +497,7 @@ _status_bar_draw_maintext(int pos)
         if (stop) {
             return;
         }
-        mvwprintw(statusbar_win, 0, pos, statusbar->fulljid);
+        mvwprintw(statusbar_win, 0, pos, "%s", statusbar->fulljid);
     }
 }