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.
This commit is contained in:
Christian Hergert
2020-11-17 14:34:11 -08:00
parent c1e05e7c52
commit 3003f37e9d

View File

@@ -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,