mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix another bug where we make assumptions about the length of a string
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
bfd6ce0f1f
commit
0e7246b0b4
1 changed files with 3 additions and 1 deletions
|
@ -237,7 +237,9 @@ static gboolean ask_save_changes()
|
||||||
label = gtk_label_new (
|
label = gtk_label_new (
|
||||||
_("You have unsaved changes\nWould you like to save those before closing the datafile?"));
|
_("You have unsaved changes\nWould you like to save those before closing the datafile?"));
|
||||||
} else {
|
} 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,
|
sprintf(label_text,
|
||||||
_("You have unsaved changes to file: %s \nWould you like to save those before closing the datafile?"),
|
_("You have unsaved changes to file: %s \nWould you like to save those before closing the datafile?"),
|
||||||
existing_filename);
|
existing_filename);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue