summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-05-09 11:16:52 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-05-09 11:19:43 -0400
commit087935f1601ab5bcfc5d7089d4c1ecf5503822c8 (patch)
tree97fe880466cba6c394c7926d4821b8023e876a37
parentdc878f24d2e26af542abca2289fea63f2c96e68e (diff)
downloadgtk+-087935f1601ab5bcfc5d7089d4c1ecf5503822c8.tar.gz
print-editor: Fix saving
g_file_replace_contents() does not accept -1 as length, unlike similar apis.
-rw-r--r--demos/print-editor/print-editor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/demos/print-editor/print-editor.c b/demos/print-editor/print-editor.c
index 2ac806df2f..27202dd2ee 100644
--- a/demos/print-editor/print-editor.c
+++ b/demos/print-editor/print-editor.c
@@ -159,7 +159,7 @@ save_file (GFile *save_filename)
error = NULL;
g_file_replace_contents (save_filename,
- text, -1,
+ text, strlen (text),
NULL, FALSE,
G_FILE_CREATE_NONE,
NULL,