diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-10-16 09:01:04 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-10-16 09:01:04 -0700 |
commit | 0e7246b0b45c0be8ed1e32649a4d223d4bccfb3a (patch) | |
tree | 6fbd698ba5063cdabb36d565eb9e88b772d2ad87 /gtk-gui.c | |
parent | bfd6ce0f1faea3a11127f6d945a6acdc659487d0 (diff) | |
download | subsurface-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |