Use real length of data instead of -1.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@576 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2006-07-17 19:24:35 +00:00
parent 6dd6175369
commit 1b0b22a210

View File

@ -611,7 +611,7 @@ void document_save_file(gint idx)
gchar* conv_file_contents = NULL;
// try to convert it from UTF-8 to original encoding
conv_file_contents = g_convert(data, -1, doc_list[idx].encoding, "UTF-8",
conv_file_contents = g_convert(data, len-1, doc_list[idx].encoding, "UTF-8",
NULL, NULL, &conv_error);
if (conv_error != NULL)