From 0e7246b0b45c0be8ed1e32649a4d223d4bccfb3a Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 16 Oct 2012 09:01:04 -0700 Subject: Fix another bug where we make assumptions about the length of a string Signed-off-by: Dirk Hohndel --- gtk-gui.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtk-gui.c b/gtk-gui.c index 45a2ae7a9..5fd16d146 100644 --- a/gtk-gui.c +++ b/gtk-gui.c @@ -237,7 +237,9 @@ static gboolean ask_save_changes() label = gtk_label_new ( _("You have unsaved changes\nWould you like to save those before closing the datafile?")); } else { - char *label_text = (char*) malloc(sizeof(char) * (94 + strlen(existing_filename))); + char *label_text = (char*) malloc(sizeof(char) * + (strlen(_("You have unsaved changes to file: %s \nWould you like to save those before closing the datafile?")) + + strlen(existing_filename))); sprintf(label_text, _("You have unsaved changes to file: %s \nWould you like to save those before closing the datafile?"), existing_filename); -- cgit v1.2.3-70-g09d2