diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-09-29 20:15:13 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-09-29 20:17:08 -0700 |
commit | 12ca6112e5a6f8e5ec8e1fee09976ef973f99680 (patch) | |
tree | e4e9ac1dd832036bca0f57ef58642a7f63fefe15 /gtk-gui.c | |
parent | 82abbf59046370c02e12d38a6f2fab026b1b078d (diff) | |
download | subsurface-12ca6112e5a6f8e5ec8e1fee09976ef973f99680.tar.gz |
Counting is hard
When updating the "You have usnaved change..." string I didn't pay
attention and missed the fact that we used it's hard coded length above to
allocate a large enough buffer.
Thanks you, Valgrind.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r-- | gtk-gui.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -231,7 +231,7 @@ 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) * (93 + strlen(existing_filename))); + char *label_text = (char*) malloc(sizeof(char) * (94 + 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); |