[gtk/file-replace-trap: 1/2] print-editor: Fix saving
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/file-replace-trap: 1/2] print-editor: Fix saving
- Date: Sun, 9 May 2021 15:20:00 +0000 (UTC)
commit 087935f1601ab5bcfc5d7089d4c1ecf5503822c8
Author: Matthias Clasen <mclasen redhat com>
Date: Sun May 9 11:16:52 2021 -0400
print-editor: Fix saving
g_file_replace_contents() does not accept -1 as
length, unlike similar apis.
demos/print-editor/print-editor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]