Always use string format in win_printf

This commit is contained in:
James Booth
2016-10-12 00:40:41 +01:00
parent 97898ee082
commit 24f0dc2734
9 changed files with 63 additions and 63 deletions

View File

@@ -308,7 +308,7 @@ chatwin_outgoing_msg(ProfChatWin *chatwin, const char *const message, char *id,
if (request_receipt && id) {
win_print_with_receipt((ProfWin*)chatwin, enc_char, "me", message, id);
} else {
win_printf((ProfWin*)chatwin, enc_char, 0, NULL, 0, THEME_TEXT_ME, "me", message);
win_printf((ProfWin*)chatwin, enc_char, 0, NULL, 0, THEME_TEXT_ME, "me", "%s", message);
}
}
@@ -322,7 +322,7 @@ chatwin_outgoing_carbon(ProfChatWin *chatwin, const char *const message, prof_en
enc_char = prefs_get_pgp_char();
}
win_printf((ProfWin*)chatwin, enc_char, 0, NULL, 0, THEME_TEXT_ME, "me", message);
win_printf((ProfWin*)chatwin, enc_char, 0, NULL, 0, THEME_TEXT_ME, "me", "%s", message);
int num = wins_get_num((ProfWin*)chatwin);
status_bar_active(num);
}
@@ -401,11 +401,11 @@ _chatwin_history(ProfChatWin *chatwin, const char *const contact)
char mm[3]; memcpy(mm, &line[3], 2); mm[2] = '\0'; int imm = atoi(mm);
char ss[3]; memcpy(ss, &line[6], 2); ss[2] = '\0'; int iss = atoi(ss);
GDateTime *timestamp = g_date_time_new_local(2000, 1, 1, ihh, imm, iss);
win_printf((ProfWin*)chatwin, '-', 0, timestamp, NO_COLOUR_DATE, 0, "", curr->data+11);
win_printf((ProfWin*)chatwin, '-', 0, timestamp, NO_COLOUR_DATE, 0, "", "%s", curr->data+11);
g_date_time_unref(timestamp);
// header
} else {
win_printf((ProfWin*)chatwin, '-', 0, NULL, 0, 0, "", curr->data);
win_printf((ProfWin*)chatwin, '-', 0, NULL, 0, 0, "", "%s", curr->data);
}
curr = g_slist_next(curr);
}