diff options
author | Christian Hergert <chergert@redhat.com> | 2020-11-17 14:34:11 -0800 |
---|---|---|
committer | Christian Hergert <chergert@redhat.com> | 2020-11-17 14:34:11 -0800 |
commit | 3003f37e9de90ba17d9be9710d69fdfde931a994 (patch) | |
tree | 516e258d9a3fda29673094e9df68111d342c1c70 /demos | |
parent | c1e05e7c52317f71e5b156f496c126d18c2aefa5 (diff) | |
download | gtk+-3003f37e9de90ba17d9be9710d69fdfde931a994.tar.gz |
node-editor: fix length of text during save
The length parameter for g_file_replace_contents() is a gsize, so -1 is
unsuitable here. Just use strlen() directly.
Diffstat (limited to 'demos')
-rw-r--r-- | demos/node-editor/node-editor-window.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/demos/node-editor/node-editor-window.c b/demos/node-editor/node-editor-window.c index ff536d60ca..bf1660d6f8 100644 --- a/demos/node-editor/node-editor-window.c +++ b/demos/node-editor/node-editor-window.c @@ -465,7 +465,7 @@ save_response_cb (GtkWidget *dialog, text = get_current_text (self->text_buffer); file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog)); - g_file_replace_contents (file, text, -1, + g_file_replace_contents (file, text, strlen (text), NULL, FALSE, G_FILE_CREATE_NONE, NULL, |