diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-11-17 23:14:29 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-11-17 23:14:29 -0500 |
commit | 831ebe3ef26ee9069edc8f6162353273eb4dbc43 (patch) | |
tree | 1e7dd74424c913344b1c74e7b869cc8c20fe6410 | |
parent | 76b8676955ffa1b346c3c367acbb8b9cdc0f7f63 (diff) | |
download | gtk+-831ebe3ef26ee9069edc8f6162353273eb4dbc43.tar.gz |
constraint-editor: Fix saving of constraints
g_file_replace_contents take a gsize, so passing -1
for string length does not work here.
-rw-r--r-- | demos/constraint-editor/constraint-editor-window.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/demos/constraint-editor/constraint-editor-window.c b/demos/constraint-editor/constraint-editor-window.c index ba25a806ec..2ec0f4cd67 100644 --- a/demos/constraint-editor/constraint-editor-window.c +++ b/demos/constraint-editor/constraint-editor-window.c @@ -300,7 +300,7 @@ save_response_cb (GtkNativeDialog *dialog, model = constraint_view_get_model (CONSTRAINT_VIEW (self->view)); text = serialize_model (model); 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, |