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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user