mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
82abbf5904
commit
12ca6112e5
1 changed files with 1 additions and 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);
|
||||
|
|
Loading…
Add table
Reference in a new issue