[gnome-contacts] src: Use format strings when constructing MessageDialogs
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] src: Use format strings when constructing MessageDialogs
- Date: Fri, 19 Apr 2019 06:02:44 +0000 (UTC)
commit 3960876475b788e0a997b1e43d9e66fadc79e1ef
Author: Philip Withnall <withnall endlessm com>
Date: Thu Apr 18 18:39:07 2019 +0100
src: Use format strings when constructing MessageDialogs
Otherwise translations of the messages passed in might contain format
placeholders which would then cause a read from an unexpected bit of the
stack.
This incorporates a patch by Cosimo Cecchi <cosimo endlessm com>.
Signed-off-by: Philip Withnall <withnall endlessm com>
src/contacts-contact-pane.vala | 2 +-
src/contacts-utils.vala | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 1fabeff..0e11e72 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -322,7 +322,7 @@ public class Contacts.ContactPane : Stack {
DialogFlags.DESTROY_WITH_PARENT | DialogFlags.MODAL,
MessageType.ERROR,
ButtonsType.OK,
- message);
+ "%s", message);
dialog.run ();
dialog.destroy ();
}
diff --git a/src/contacts-utils.vala b/src/contacts-utils.vala
index 5552e8c..396aad9 100644
--- a/src/contacts-utils.vala
+++ b/src/contacts-utils.vala
@@ -169,7 +169,7 @@ namespace Contacts.Utils {
Gtk.DialogFlags.MODAL,
Gtk.MessageType.ERROR,
Gtk.ButtonsType.OK,
- error);
+ "%s", error);
dialog.run();
dialog.destroy();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]