aboutsummaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-10-16 09:01:04 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-10-16 09:01:04 -0700
commit0e7246b0b45c0be8ed1e32649a4d223d4bccfb3a (patch)
tree6fbd698ba5063cdabb36d565eb9e88b772d2ad87 /gtk-gui.c
parentbfd6ce0f1faea3a11127f6d945a6acdc659487d0 (diff)
downloadsubsurface-0e7246b0b45c0be8ed1e32649a4d223d4bccfb3a.tar.gz
Fix another bug where we make assumptions about the length of a string
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c4
1 files changed, 3 insertions, 1 deletions
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);