aboutsummaryrefslogtreecommitdiff
path: root/src/messageview.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/messageview.c')
-rw-r--r--src/messageview.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/messageview.c b/src/messageview.c
index 109801a5..4365778b 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -748,7 +748,6 @@ static void print_cb(gpointer data, guint action, GtkWidget *widget)
MessageView *messageview = (MessageView *)data;
const gchar *cmdline;
gchar *msg;
- gchar *p;
if (!messageview->msginfo) return;
@@ -765,8 +764,7 @@ static void print_cb(gpointer data, guint action, GtkWidget *widget)
}
g_free(msg);
- if (cmdline && (!(p = strchr(cmdline, '%')) || *(p + 1) != 's' ||
- strchr(p + 2, '%'))) {
+ if (cmdline && str_find_format_times(cmdline, 's') != 1) {
alertpanel_error(_("Print command line is invalid:\n`%s'"),
cmdline);
return;