summaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Mikko Rasa <tdb@tdb.fi>2012-08-22 00:26:58 +0300
committerGravatar Mikko Rasa <tdb@tdb.fi>2012-08-22 00:43:52 +0300
commitc6be2404dafcb5032f8e35d31bca570f0ae80ef6 (patch)
treed335c4d3ef910b9fa0d3ba8700893be5f4dc05cf /gtk-gui.c
parent0c49d406e0a7dd1fc66da81ece40405fd053302c (diff)
downloadsubsurface-c6be2404dafcb5032f8e35d31bca570f0ae80ef6.tar.gz
Fix an off-by-one error in buffer allocation
Signed-off-by: Mikko Rasa <tdb@tdb.fi>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index 306e1a5e7..ac80a47f4 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -223,7 +223,7 @@ static gboolean ask_save_changes()
label = gtk_label_new (
"You have unsaved changes\nWould you like to save those before exiting the program?");
} else {
- char *label_text = (char*) malloc(sizeof(char) * (92 + strlen(existing_filename)));
+ char *label_text = (char*) malloc(sizeof(char) * (93 + strlen(existing_filename)));
sprintf(label_text,
"You have unsaved changes to file: %s \nWould you like to save those before exiting the program?",
existing_filename);